Files
using.cash/BuildFiles/Packaging/templates/postinst-backend.template
T

24 lines
563 B
Bash

#!/bin/bash
#echo "DEBUG: Executing post-installation script, swarmops-backend"
#make sure some directories exist
mkdir -p /var/lib/swarmops/upload
#todo: check for database upgrade
#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
#echo "DEBUG: Exiting post-install script, swarmops-backend"