aboutsummaryrefslogtreecommitdiff
path: root/rtr-origin/server.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rtr-origin/server.sh')
-rwxr-xr-xrtr-origin/server.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/rtr-origin/server.sh b/rtr-origin/server.sh
new file mode 100755
index 00000000..09ddf733
--- /dev/null
+++ b/rtr-origin/server.sh
@@ -0,0 +1,23 @@
+#!/bin/sh -
+#
+# Wrapper for rtr-origin.py in server mode, for testing.
+#
+# In production we would probably want to handle all of this either
+# directly in the Python code or in the command= setting for a
+# particular ssh key, but for initial testing it's simpler to run a
+# shall script to change to the right directory and supply any
+# necessary command line arguments.
+#
+# Be warned that almost any error here will cause the subsystem to
+# fail mysteriously, leaving behind naught but a SIGCHILD log message
+# from sshd as this script dies.
+
+#/usr/bin/printenv >> /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/server.log
+
+#echo '[Server starting up]' >> /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/server.log
+
+cd /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/
+
+#/usr/local/bin/python rtr-origin.py server >> /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/server.log 2>&1
+
+exec /usr/local/bin/python rtr-origin.py server 2>> /u/sra/rpki/subvert-rpki.hactrn.net/rtr-origin/server.log