pre_upgrade() { systemctl stop cgatepro && ( touch '/tmp/cgatepro-was-started' echo 'Communigaet Pro has been stopped.' ) } post_install() { chgrp mail "$pkgdir"/opt/CommuniGate -R chgrp mail "$pkgdir"/var/lib/CommuniGate -R cat <<- EOF ==> Start Communigate Pro using systemd: # systemctl start cgatepro ==> Auto-start Communigate Pro on boot: # systemctl enable cgatepro Setup: ==> Point your web browser to http://localhost:8010 to configure Communigate Pro. EOF } post_upgrade() { systemctl --system daemon-reload if [ -f '/tmp/cgatepro-was-started' ]; then rm '/tmp/cgatepro-was-started' systemctl start cgatepro echo 'Communigate Pro has been started.' fi }