1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
# vim:ft=upstart:
description "SauceLabs' Sauce Connect tunnel worker supervisor service"
start on runlevel [2345]
stop on runlevel [016]
pre-start script
# Load configuration
test -r /etc/default/sc || { stop; exit 0; }
. /etc/default/sc
test -n "$SE_PORTS" || { stop; exit 1; }
for se_port in $SE_PORTS
do
start sc_worker SE_PORT=$se_port
done
end script
post-stop script
# Load configuration
test -r /etc/default/sc || { stop; exit 0; }
. /etc/default/sc
test -n "$SE_PORTS" || { stop; exit 1; }
for se_port in $SE_PORTS
do
stop sc_worker SE_PORT=$se_port || true # ignore shutdown instances
done
end script
|