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

21 lines
482 B
Bash

#!/bin/bash
#echo "Swarmops post-installation script running"
#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