commit 24bc5585983fef4e35f46cf315f14792958890ec
parent 32ac6432dc1084e0c1aa61d480bb61de39dab58c
Author: Dominik Schmidt <doeme@bastli.ethz.ch>
Date: Tue, 11 Sep 2018 17:37:47 +0200
Merge branch 'master' of code.bastli.ch:bastli/RaPOUNSeL
Diffstat:
5 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/daemon.sh b/daemon.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-exec ./amqp-consume --server=backdoor.bastli.ch:5672 "--username=${USERNAME}" "--password=${PASSWORD}" --vhost="/" -q print_queue ./pipeline.sh
+exec ./amqp-consume --server=backdoor.bastli.ch:5672 --username="${RABBIT_USERNAME}" "--password=${RABBIT_PASSWORD}" --vhost="/" --queue="print_queue" ./start_pipeline.sh
diff --git a/pipeline.sh b/pipeline.sh
@@ -1,5 +1,11 @@
#!/bin/bash
+if [[ "${#@}" -eq 0 ]]
+then
+ echo "No commands specified" >&2
+ exit
+fi
+
if [[ ${#@} -eq 1 ]]
then
exec "$1"
diff --git a/pipeline/99_print b/pipeline/99_print
@@ -1,6 +1,6 @@
#!/bin/sh
-if [[ -n "$PRINT_TO_STDOUT" ]]
+if [ -n "$PRINT_TO_STDOUT" ]
then
exec cat
else
diff --git a/run b/run
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec setuidgid bastli envdir ./env/ ./daemon.sh
diff --git a/template.roff b/template.roff
@@ -36,6 +36,7 @@
.br
/_____/
.br
+.po 0c
RECEIPT