aboutsummaryrefslogtreecommitdiff
path: root/startup.sh
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2019-09-03 19:06:01 +0000
committerRob Austein <sra@hactrn.net>2019-09-03 19:14:09 +0000
commit75f091a80059ca6c8dc8b2c93ebf16f6effb892d (patch)
treec89c6f14152a32238760530aeee0b188706b2a12 /startup.sh
First public version
Diffstat (limited to 'startup.sh')
-rwxr-xr-xstartup.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/startup.sh b/startup.sh
new file mode 100755
index 0000000..83765c4
--- /dev/null
+++ b/startup.sh
@@ -0,0 +1,25 @@
+#!/bin/sh -
+#
+# Startup script for rpki-rp running under Docker.
+#
+# This assumes that cron is already running, and that this script is running as root.
+# Most likely this script is running under cron as a @reboot action.
+
+# Start non-RPKI daemons. postgresql in particular needs to be up
+# before the RPKI code so that we can check the database and configure
+# it if necessary.
+
+for i in rsyslog postgresql xinetd apache2
+do
+ service $i start
+ sleep 1
+done
+
+# Run rpki-rp's postinst script. This is a no-op if everything's up
+# to date, but will do everything including creating databases if needed.
+
+dpkg --configure --pending
+
+# The rest of rpki-rp runs under cron
+
+exec /usr/sbin/cron -f -L 15