Updated install scripts to use systemd if running
This commit is contained in:
@@ -5,8 +5,16 @@
|
||||
mkdir -p /var/lib/swarmops/upload
|
||||
#todo: check for database upgrade
|
||||
|
||||
#start the daemon
|
||||
/etc/init.d/swarmops-backend start
|
||||
#if we're running systemd, use systemd;
|
||||
#otherwise, use upstart
|
||||
|
||||
if [ -z $(pidof systemd) ]; then
|
||||
#start the daemon
|
||||
/etc/init.d/swarmops-backend start
|
||||
#register the daemon
|
||||
update-rc.d swarmops-backend defaults 90 10 > /dev/null
|
||||
else
|
||||
systemctl enable swarmops-backend
|
||||
systemctl start swarmops-backend
|
||||
fi
|
||||
|
||||
#register the daemon
|
||||
update-rc.d swarmops-backend defaults 90 10 > /dev/null
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
#! /bin/bash
|
||||
|
||||
update-rc.d -f swarmops-backend remove > /dev/null
|
||||
/etc/init.d/swarmops-backend stop
|
||||
# Different paths for systemd and upstart
|
||||
|
||||
if [ -z $(pidof systemd) ]; then
|
||||
update-rc.d -f swarmops-backend remove > /dev/null
|
||||
/etc/init.d/swarmops-backend stop
|
||||
else
|
||||
systemctl stop swarmops-backend
|
||||
systemctl disable swarmops-backend
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user