From 0a30deb7e23e1a4ee579850f3edc8240186e9cd3 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Wed, 19 Sep 2018 16:52:29 +0200 Subject: [PATCH] Have s6-setuidgid look up names from /etc/hosts --- build-all.sh | 2 ++ ckan-datapusher/lxc/run | 2 +- cts/lxc/etc/services.d/cts/run | 2 +- frontlinesms/lxc/etc/services.d/frontlinesms/run | 2 +- frontlinesms/lxc/etc/services.d/xorg/run | 2 +- opendatakit-build/lxc/etc/services.d/build2xlsform/run | 2 +- opendatakit-build/lxc/etc/services.d/odkbuild/run | 2 +- openmapkit/lxc/etc/services.d/openmapkit/run | 2 +- pandora/lxc/etc/services.d/pandora-cron/run | 2 +- pandora/lxc/etc/services.d/pandora-encoding/run | 2 +- pandora/lxc/etc/services.d/pandora-tasks/run | 2 +- pandora/lxc/etc/services.d/pandora/run | 2 +- 12 files changed, 13 insertions(+), 11 deletions(-) diff --git a/build-all.sh b/build-all.sh index bd1b09c..e69a531 100755 --- a/build-all.sh +++ b/build-all.sh @@ -43,6 +43,8 @@ lxc-build ${SOURCE_DIR}/postgres lxc-build ${SOURCE_DIR}/rabbitmq lxc-build ${SOURCE_DIR}/redis lxc-build ${SOURCE_DIR}/sahana +lxc-build ${SOURCE_DIR}/sahana-demo +lxc-build ${SOURCE_DIR}/sambro lxc-build ${SOURCE_DIR}/seeddms lxc-build ${SOURCE_DIR}/sigmah lxc-build ${SOURCE_DIR}/solr diff --git a/ckan-datapusher/lxc/run b/ckan-datapusher/lxc/run index a3a1bc9..2d1d0bd 100644 --- a/ckan-datapusher/lxc/run +++ b/ckan-datapusher/lxc/run @@ -1,5 +1,5 @@ #!/bin/execlineb -P foreground { /bin/add-ca-cert } -s6-setuidgid 8004:8004 +s6-setuidgid ckandp /usr/sbin/uwsgi --plugin python --http-socket 0.0.0.0:8080 --wsgi-file /etc/ckan-datapusher/datapusher.wsgi --enable-threads diff --git a/cts/lxc/etc/services.d/cts/run b/cts/lxc/etc/services.d/cts/run index d505c43..638854a 100755 --- a/cts/lxc/etc/services.d/cts/run +++ b/cts/lxc/etc/services.d/cts/run @@ -3,5 +3,5 @@ cd /srv/cts export DJANGO_SETTINGS_MODULE cts.settings.spotter fdmove -c 2 1 -s6-setuidgid 8006:8006 +s6-setuidgid cts /srv/cts/manage.py runserver diff --git a/frontlinesms/lxc/etc/services.d/frontlinesms/run b/frontlinesms/lxc/etc/services.d/frontlinesms/run index 0d71114..5a4c6c0 100755 --- a/frontlinesms/lxc/etc/services.d/frontlinesms/run +++ b/frontlinesms/lxc/etc/services.d/frontlinesms/run @@ -4,5 +4,5 @@ foreground { s6-svwait -t 3000 -u /etc/services.d/xorg } cd /srv/frontlinesms export DISPLAY :10 fdmove -c 2 1 -s6-setuidgid 8018:8018 +s6-setuidgid sms /srv/frontlinesms/frontlinesms2/FrontlineSMS2_Launcher diff --git a/frontlinesms/lxc/etc/services.d/xorg/run b/frontlinesms/lxc/etc/services.d/xorg/run index 66da33c..1cc1117 100755 --- a/frontlinesms/lxc/etc/services.d/xorg/run +++ b/frontlinesms/lxc/etc/services.d/xorg/run @@ -1,5 +1,5 @@ #!/bin/execlineb -P fdmove -c 2 1 -s6-setuidgid 8018:8018 +s6-setuidgid sms Xorg -noreset +extension GLX +extension RANDR +extension RENDER -config dummy.conf :10 diff --git a/opendatakit-build/lxc/etc/services.d/build2xlsform/run b/opendatakit-build/lxc/etc/services.d/build2xlsform/run index befea46..bc53771 100755 --- a/opendatakit-build/lxc/etc/services.d/build2xlsform/run +++ b/opendatakit-build/lxc/etc/services.d/build2xlsform/run @@ -2,5 +2,5 @@ cd /srv/build2xlsform fdmove -c 2 1 -s6-setuidgid 8017:8017 +s6-setuidgid odkbuild node lib/server.js diff --git a/opendatakit-build/lxc/etc/services.d/odkbuild/run b/opendatakit-build/lxc/etc/services.d/odkbuild/run index 18dbff1..81fe4c5 100755 --- a/opendatakit-build/lxc/etc/services.d/odkbuild/run +++ b/opendatakit-build/lxc/etc/services.d/odkbuild/run @@ -3,5 +3,5 @@ cd /srv/opendatakit-build fdmove -c 2 1 foreground { /usr/sbin/update-ca-certificates } -s6-setuidgid 8017:8017 +s6-setuidgid odkbuild bundle exec rackup config.ru -o 0.0.0.0 -p 8080 diff --git a/openmapkit/lxc/etc/services.d/openmapkit/run b/openmapkit/lxc/etc/services.d/openmapkit/run index 091fcc2..709d1b4 100755 --- a/openmapkit/lxc/etc/services.d/openmapkit/run +++ b/openmapkit/lxc/etc/services.d/openmapkit/run @@ -2,5 +2,5 @@ fdmove -c 2 1 export NODE_ENV production -s6-setuidgid 8007:8007 +s6-setuidgid omk /usr/bin/node /srv/openmapkit/server.js diff --git a/pandora/lxc/etc/services.d/pandora-cron/run b/pandora/lxc/etc/services.d/pandora-cron/run index d4012e9..739a992 100755 --- a/pandora/lxc/etc/services.d/pandora-cron/run +++ b/pandora/lxc/etc/services.d/pandora-cron/run @@ -3,5 +3,5 @@ cd /srv/pandora/pandora export HOME /srv/pandora fdmove -c 2 1 -s6-setuidgid 8002:8002 +s6-setuidgid pandora ./manage.py celerybeat -s /srv/pandora/data/celerybeat-schedule --pidfile pandora-cron.pid -l INFO diff --git a/pandora/lxc/etc/services.d/pandora-encoding/run b/pandora/lxc/etc/services.d/pandora-encoding/run index 6b2f552..eb9a1d5 100755 --- a/pandora/lxc/etc/services.d/pandora-encoding/run +++ b/pandora/lxc/etc/services.d/pandora-encoding/run @@ -3,5 +3,5 @@ cd /srv/pandora/pandora export HOME /srv/pandora fdmove -c 2 1 -s6-setuidgid 8002:8002 +s6-setuidgid pandora ./manage.py celery worker -Q encoding -n pandora-encoding --pidfile pandora-encoding.pid --maxtasksperchild 500 -l INFO diff --git a/pandora/lxc/etc/services.d/pandora-tasks/run b/pandora/lxc/etc/services.d/pandora-tasks/run index 099e5ac..5f5c1d6 100755 --- a/pandora/lxc/etc/services.d/pandora-tasks/run +++ b/pandora/lxc/etc/services.d/pandora-tasks/run @@ -3,5 +3,5 @@ cd /srv/pandora/pandora export HOME /srv/pandora fdmove -c 2 1 -s6-setuidgid 8002:8002 +s6-setuidgid pandora ./manage.py celery worker -Q default,celery -n pandora-default --pidfile pandora-tasks.pid --maxtasksperchild 1000 -l INFO diff --git a/pandora/lxc/etc/services.d/pandora/run b/pandora/lxc/etc/services.d/pandora/run index 64ad108..81bfbb8 100755 --- a/pandora/lxc/etc/services.d/pandora/run +++ b/pandora/lxc/etc/services.d/pandora/run @@ -3,5 +3,5 @@ cd /srv/pandora/pandora export HOME /srv/pandora fdmove -c 2 1 -s6-setuidgid 8002:8002 +s6-setuidgid pandora gunicorn -c gunicorn_config.py wsgi:application