Commit e48155a7 authored by David Johnson's avatar David Johnson

Down our Docker services the proper runit way.

parent f3dc1bfe
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
if [ -f /etc/init.d/pubsubd ]; then if [ -f /etc/init.d/pubsubd ]; then
exec /etc/init.d/pubsubd stop exec /etc/init.d/pubsubd stop
else else
touch /etc/service/pubsubd/down sv down pubsubd
fi fi
exit 0 exit 0
...@@ -13,7 +13,7 @@ if [ -f /etc/init.d/pubsubd ]; then ...@@ -13,7 +13,7 @@ if [ -f /etc/init.d/pubsubd ]; then
sleep 60 sleep 60
done done
else else
touch /etc/service/pubsubd/down sv down pubsubd
fi fi
exit 0 exit 0
...@@ -13,7 +13,7 @@ if [ -f /usr/local/etc/emulab/rc/rc.testbed ]; then ...@@ -13,7 +13,7 @@ if [ -f /usr/local/etc/emulab/rc/rc.testbed ]; then
sleep 60 sleep 60
done done
else else
touch /etc/service/testbed/down sv down testbed
fi fi
exit 0 exit 0
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/pubsubd/down ; exit 0) && (sv down pubsubd ; exit 0)
if [ -f /etc/init.d/pubsubd ]; then if [ -f /etc/init.d/pubsubd ]; then
exec /etc/init.d/pubsubd stop exec /etc/init.d/pubsubd stop
else else
touch /etc/service/pubsubd/down sv down pubsubd
fi fi
exit 0 exit 0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/pubsubd/down ; exit 0) && (sv down pubsubd ; exit 0)
if [ -f /etc/init.d/pubsubd ]; then if [ -f /etc/init.d/pubsubd ]; then
/etc/init.d/pubsubd start /etc/init.d/pubsubd start
...@@ -17,7 +17,7 @@ if [ -f /etc/init.d/pubsubd ]; then ...@@ -17,7 +17,7 @@ if [ -f /etc/init.d/pubsubd ]; then
sleep 60 sleep 60
done done
else else
touch /etc/service/pubsubd/down sv down pubsubd
fi fi
exit 0 exit 0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/testbed/down ; exit 0) && (sv down testbed ; exit 0)
if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then
exec /usr/local/etc/emulab/initscripts/testbed stop exec /usr/local/etc/emulab/initscripts/testbed stop
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/testbed/down ; exit 0) && (sv down testbed ; exit 0)
if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then
/usr/local/etc/emulab/initscripts/testbed start /usr/local/etc/emulab/initscripts/testbed start
...@@ -17,7 +17,7 @@ if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then ...@@ -17,7 +17,7 @@ if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then
sleep 60 sleep 60
done done
else else
touch /etc/service/testbed/down sv down testbed
fi fi
exit 0 exit 0
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/pubsubd/down ; exit 0) && (sv down pubsubd ; exit 0)
if [ -f /etc/init.d/pubsubd ]; then if [ -f /etc/init.d/pubsubd ]; then
exec /etc/init.d/pubsubd stop exec /etc/init.d/pubsubd stop
else else
touch /etc/service/pubsubd/down sv down pubsubd
fi fi
exit 0 exit 0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/pubsubd/down ; exit 0) && (sv down pubsubd ; exit 0)
if [ -f /etc/init.d/pubsubd ]; then if [ -f /etc/init.d/pubsubd ]; then
/etc/init.d/pubsubd start /etc/init.d/pubsubd start
...@@ -17,7 +17,7 @@ if [ -f /etc/init.d/pubsubd ]; then ...@@ -17,7 +17,7 @@ if [ -f /etc/init.d/pubsubd ]; then
sleep 60 sleep 60
done done
else else
touch /etc/service/pubsubd/down sv down pubsubd
fi fi
exit 0 exit 0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/testbed/down ; exit 0) && (sv down testbed ; exit 0)
if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then
exec /usr/local/etc/emulab/initscripts/testbed stop exec /usr/local/etc/emulab/initscripts/testbed stop
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/testbed/down ; exit 0) && (sv down testbed ; exit 0)
if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then
/usr/local/etc/emulab/initscripts/testbed start /usr/local/etc/emulab/initscripts/testbed start
...@@ -17,7 +17,7 @@ if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then ...@@ -17,7 +17,7 @@ if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then
sleep 60 sleep 60
done done
else else
touch /etc/service/testbed/down sv down testbed
fi fi
exit 0 exit 0
...@@ -5,7 +5,7 @@ echo -n 'testbed config: ' ...@@ -5,7 +5,7 @@ echo -n 'testbed config: '
/usr/local/etc/emulab/rc/rc.testbed /usr/local/etc/emulab/rc/rc.testbed
if [ ! $? -eq 0 ]; then if [ ! $? -eq 0 ]; then
echo "Failed to start /usr/local/etc/emulab/rc/rc.testbed: $?" echo "Failed to start /usr/local/etc/emulab/rc/rc.testbed: $?"
#touch /etc/service/testbed/down #sv down testbed
exit $? exit $?
fi fi
touch /var/lock/subsys/testbed touch /var/lock/subsys/testbed
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/pubsubd/down ; exit 0) && (sv down pubsubd ; exit 0)
if [ -f /etc/init.d/pubsubd ]; then if [ -f /etc/init.d/pubsubd ]; then
exec /etc/init.d/pubsubd stop exec /etc/init.d/pubsubd stop
else else
touch /etc/service/pubsubd/down sv down pubsubd
fi fi
exit 0 exit 0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/pubsubd/down ; exit 0) && (sv down pubsubd ; exit 0)
if [ -f /etc/init.d/pubsubd ]; then if [ -f /etc/init.d/pubsubd ]; then
/etc/init.d/pubsubd start /etc/init.d/pubsubd start
...@@ -17,7 +17,7 @@ if [ -f /etc/init.d/pubsubd ]; then ...@@ -17,7 +17,7 @@ if [ -f /etc/init.d/pubsubd ]; then
sleep 60 sleep 60
done done
else else
touch /etc/service/pubsubd/down sv down pubsubd
fi fi
exit 0 exit 0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/testbed/down ; exit 0) && (sv down testbed ; exit 0)
if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then
exec /usr/local/etc/emulab/initscripts/testbed stop exec /usr/local/etc/emulab/initscripts/testbed stop
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Never run if systemd is running; it will do this. # Never run if systemd is running; it will do this.
[ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \ [ -f /bin/systemctl ] && /bin/systemctl show-environment >/dev/null 2>&1 \
&& (touch /etc/service/testbed/down ; exit 0) && (sv down testbed ; exit 0)
if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then
/usr/local/etc/emulab/initscripts/testbed start /usr/local/etc/emulab/initscripts/testbed start
...@@ -17,7 +17,7 @@ if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then ...@@ -17,7 +17,7 @@ if [ -f /usr/local/etc/emulab/initscripts/testbed ]; then
sleep 60 sleep 60
done done
else else
touch /etc/service/testbed/down sv down testbed
fi fi
exit 0 exit 0
...@@ -5,7 +5,7 @@ echo -n 'testbed config: ' ...@@ -5,7 +5,7 @@ echo -n 'testbed config: '
/usr/local/etc/emulab/rc/rc.testbed /usr/local/etc/emulab/rc/rc.testbed
if [ ! $? -eq 0 ]; then if [ ! $? -eq 0 ]; then
echo "Failed to start /usr/local/etc/emulab/rc/rc.testbed: $?" echo "Failed to start /usr/local/etc/emulab/rc/rc.testbed: $?"
#touch /etc/service/testbed/down #sv down testbed
exit $? exit $?
fi fi
touch /var/lock/subsys/testbed touch /var/lock/subsys/testbed
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment