aboutsummaryrefslogtreecommitdiffstats
path: root/service/entrypoint.sh
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2021-04-29 16:20:38 +0200
committerLouis Burda <quent.burda@gmail.com>2021-04-29 16:20:38 +0200
commit008b5f74235a7fd04852e6f640429269f1ec4845 (patch)
tree7eea7fea892da529fe4f37a437218705a4158ca8 /service/entrypoint.sh
parent8aac44bb98af5442e29c8cb9a5a4acbe40d96bb2 (diff)
downloadenowars5-service-stldoctor-008b5f74235a7fd04852e6f640429269f1ec4845.tar.gz
enowars5-service-stldoctor-008b5f74235a7fd04852e6f640429269f1ec4845.zip
basic service structure and docker setup
Diffstat (limited to 'service/entrypoint.sh')
-rwxr-xr-xservice/entrypoint.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/service/entrypoint.sh b/service/entrypoint.sh
index 5445e3e..14cde26 100755
--- a/service/entrypoint.sh
+++ b/service/entrypoint.sh
@@ -1,9 +1,10 @@
#!/bin/sh
-set -e
-set -x
-# Chown the mounted data volume
+set -e -x
+
chown -R service:service "/data/"
-# Launch our service as user 'service'
-exec su -s /bin/sh -c 'PYTHONUNBUFFERED=1 python3 n0t3b00k.py' service \ No newline at end of file
+export RESULTDIR="/data"
+
+servicecmd='socat TCP-LISTEN:9000,fork,reuseaddr EXEC:"/service/printdoc",raw,pty,echo=0,stderr'
+exec su -s /bin/sh -c "$servicecmd" service