diff --git a/cts/lxc/etc/services.d/.s6-svscan/finish b/cts/lxc/etc/services.d/.s6-svscan/finish index 78d5fdc..4da043c 100755 --- a/cts/lxc/etc/services.d/.s6-svscan/finish +++ b/cts/lxc/etc/services.d/.s6-svscan/finish @@ -1,3 +1,4 @@ -#!/bin/sh +#!/bin/execlineb -P -/bin/true +foreground { s6-svwait -d -t 3000 cts } +foreground { s6-svwait -d -t 3000 nginx } diff --git a/cts/lxc/etc/services.d/cts/down-signal b/cts/lxc/etc/services.d/cts/down-signal new file mode 100644 index 0000000..fc6cc59 --- /dev/null +++ b/cts/lxc/etc/services.d/cts/down-signal @@ -0,0 +1 @@ +SIGINT diff --git a/frontlinesms/lxc/etc/services.d/.s6-svscan/finish b/frontlinesms/lxc/etc/services.d/.s6-svscan/finish index 78d5fdc..e155b76 100755 --- a/frontlinesms/lxc/etc/services.d/.s6-svscan/finish +++ b/frontlinesms/lxc/etc/services.d/.s6-svscan/finish @@ -1,3 +1,4 @@ -#!/bin/sh +#!/bin/execlineb -P -/bin/true +foreground { s6-svwait -d -t 3000 frontlinesms } +foreground { s6-svwait -d -t 3000 x11 } diff --git a/kanboard/lxc/etc/services.d/.s6-svscan/finish b/kanboard/lxc/etc/services.d/.s6-svscan/finish index 78d5fdc..c9e7add 100755 --- a/kanboard/lxc/etc/services.d/.s6-svscan/finish +++ b/kanboard/lxc/etc/services.d/.s6-svscan/finish @@ -1,3 +1,4 @@ -#!/bin/sh +#!/bin/execlineb -P -/bin/true +foreground { s6-svwait -d -t 3000 nginx } +foreground { s6-svwait -d -t 3000 php-fpm } diff --git a/mifosx/lxc/etc/services.d/.s6-svscan/finish b/mifosx/lxc/etc/services.d/.s6-svscan/finish new file mode 100755 index 0000000..a78e381 --- /dev/null +++ b/mifosx/lxc/etc/services.d/.s6-svscan/finish @@ -0,0 +1,3 @@ +#!/bin/execlineb -P + +foreground { s6-svwait -d -t 3000 mifosx } diff --git a/mifosx/lxc/etc/services.d/mifosx/run b/mifosx/lxc/etc/services.d/mifosx/run new file mode 100755 index 0000000..62728af --- /dev/null +++ b/mifosx/lxc/etc/services.d/mifosx/run @@ -0,0 +1,6 @@ +#!/bin/execlineb -P + +cd /srv/tomcat +fdmove -c 2 1 +s6-setuidgid mifosx +catalina.sh run diff --git a/mifosx/lxcfile b/mifosx/lxcfile index 7896122..d314023 100644 --- a/mifosx/lxcfile +++ b/mifosx/lxcfile @@ -39,9 +39,10 @@ RUN EOF rm /tmp/locale-cs.patch EOF +# s6 required for single service due to hanging threads +COPY lxc + MOUNT FILE /srv/mifosx/conf/server.xml srv/tomcat/conf/server.xml MOUNT FILE /srv/mifosx/conf/context.xml srv/tomcat/webapps/fineract-provider/META-INF/context.xml -USER 8012 8012 -WORKDIR /srv/tomcat -CMD catalina.sh run +CMD s6-svscan /etc/services.d diff --git a/opendatakit-build/lxc/etc/services.d/.s6-svscan/finish b/opendatakit-build/lxc/etc/services.d/.s6-svscan/finish index 78d5fdc..a280967 100755 --- a/opendatakit-build/lxc/etc/services.d/.s6-svscan/finish +++ b/opendatakit-build/lxc/etc/services.d/.s6-svscan/finish @@ -1,3 +1,4 @@ -#!/bin/sh +#!/bin/execlineb -P -/bin/true +foreground { s6-svwait -d -t 3000 build2xlsform } +foreground { s6-svwait -d -t 3000 odkbuild } diff --git a/opendatakit-build/lxc/etc/services.d/odkbuild/down-signal b/opendatakit-build/lxc/etc/services.d/odkbuild/down-signal new file mode 100644 index 0000000..fc6cc59 --- /dev/null +++ b/opendatakit-build/lxc/etc/services.d/odkbuild/down-signal @@ -0,0 +1 @@ +SIGINT diff --git a/opendatakit-build/lxc/etc/services.d/odkbuild/run b/opendatakit-build/lxc/etc/services.d/odkbuild/run index 81fe4c5..3781d04 100755 --- a/opendatakit-build/lxc/etc/services.d/odkbuild/run +++ b/opendatakit-build/lxc/etc/services.d/odkbuild/run @@ -2,6 +2,6 @@ cd /srv/opendatakit-build fdmove -c 2 1 -foreground { /usr/sbin/update-ca-certificates } +foreground { update-ca-certificates } s6-setuidgid odkbuild bundle exec rackup config.ru -o 0.0.0.0 -p 8080 diff --git a/openmapkit/lxc/etc/services.d/.s6-svscan/finish b/openmapkit/lxc/etc/services.d/.s6-svscan/finish index 78d5fdc..11c49e7 100755 --- a/openmapkit/lxc/etc/services.d/.s6-svscan/finish +++ b/openmapkit/lxc/etc/services.d/.s6-svscan/finish @@ -1,3 +1,3 @@ -#!/bin/sh +#!/bin/execlineb -P -/bin/true +foreground { s6-svwait -d -t 3000 openmapkit } diff --git a/openmapkit/lxcfile b/openmapkit/lxcfile index 4751ddb..54ae19c 100644 --- a/openmapkit/lxcfile +++ b/openmapkit/lxcfile @@ -36,6 +36,7 @@ RUN EOF rm -rf /root/.cache /root/.config /root/.node-gyp /root/.npm EOF +# s6 required for single service due to inability of nodejs to process signals when running as PID 1 COPY lxc MOUNT FILE /srv/openmapkit/conf/settings.js srv/openmapkit/settings.js diff --git a/pandora/lxc/etc/services.d/.s6-svscan/finish b/pandora/lxc/etc/services.d/.s6-svscan/finish index 78d5fdc..c6e8198 100755 --- a/pandora/lxc/etc/services.d/.s6-svscan/finish +++ b/pandora/lxc/etc/services.d/.s6-svscan/finish @@ -1,3 +1,7 @@ -#!/bin/sh +#!/bin/execlineb -P -/bin/true +foreground { s6-svwait -d -t 3000 nginx } +foreground { s6-svwait -d -t 3000 pandora } +foreground { s6-svwait -d -t 3000 pandora-cron } +foreground { s6-svwait -d -t 3000 pandora-encoding } +foreground { s6-svwait -d -t 3000 pandora-tasks } diff --git a/sahana/lxc/etc/services.d/.s6-svscan/finish b/sahana/lxc/etc/services.d/.s6-svscan/finish index 78d5fdc..f0bc617 100755 --- a/sahana/lxc/etc/services.d/.s6-svscan/finish +++ b/sahana/lxc/etc/services.d/.s6-svscan/finish @@ -1,3 +1,4 @@ -#!/bin/sh +#!/bin/execlineb -P -/bin/true +foreground { s6-svwait -d -t 3000 nginx } +foreground { s6-svwait -d -t 3000 uwsgi } diff --git a/sahana/lxc/etc/services.d/uwsgi/down-signal b/sahana/lxc/etc/services.d/uwsgi/down-signal new file mode 100644 index 0000000..fc6cc59 --- /dev/null +++ b/sahana/lxc/etc/services.d/uwsgi/down-signal @@ -0,0 +1 @@ +SIGINT diff --git a/seeddms/lxc/etc/services.d/.s6-svscan/finish b/seeddms/lxc/etc/services.d/.s6-svscan/finish index 78d5fdc..c9e7add 100755 --- a/seeddms/lxc/etc/services.d/.s6-svscan/finish +++ b/seeddms/lxc/etc/services.d/.s6-svscan/finish @@ -1,3 +1,4 @@ -#!/bin/sh +#!/bin/execlineb -P -/bin/true +foreground { s6-svwait -d -t 3000 nginx } +foreground { s6-svwait -d -t 3000 php-fpm } diff --git a/ushahidi/lxc/etc/services.d/.s6-svscan/finish b/ushahidi/lxc/etc/services.d/.s6-svscan/finish index 78d5fdc..c9e7add 100755 --- a/ushahidi/lxc/etc/services.d/.s6-svscan/finish +++ b/ushahidi/lxc/etc/services.d/.s6-svscan/finish @@ -1,3 +1,4 @@ -#!/bin/sh +#!/bin/execlineb -P -/bin/true +foreground { s6-svwait -d -t 3000 nginx } +foreground { s6-svwait -d -t 3000 php-fpm }