piframe/piframefleet/root/etc/services.d/_service_control/run

21 lines
663 B
Plaintext
Executable file

#!/usr/bin/with-contenv bash
# Only run the services control script (this one) once
# DO NOT IMMEDIATELY DOWN -- NEED TO TERM THE REST OF THE SERVICES FIRST
s6-svc -o /var/run/s6/services/_service_control
# s6-svc -od means to take down the service and flag it to run AT MOST once
# Service run scripts should check for enablement and immediately exit for this to work well
if [ "$ENABLE_WIREGUARD" = false ] ; then
s6-svc -od /var/run/s6/services/wireguard
fi
#if [ "$ENABLE_SYNCTHING" = false ] ; then
# s6-svc -od /var/run/s6/services/syncthing
#fi
if [ "$ENABLE_FILE_BROWSER" = false ] ; then
s6-svc -od /var/run/s6/services/filebrowser
fi