github.com/marinho/drone@v0.2.1-0.20140504195434-d3ba962e89a7/deb/drone/DEBIAN/postinst (about) 1 #!/bin/sh 2 set -e 3 4 case "$1" in 5 abort-upgrade|abort-remove|abort-deconfigure|configure) 6 ;; 7 8 *) 9 echo "postinst called with unknown argument \`$1'" >&2 10 exit 1 11 ;; 12 esac 13 14 echo "Starting drone ..." 15 if [ -f /etc/init/drone.conf ]; then 16 if pidof /usr/local/bin/droned >/dev/null; then 17 service drone stop || exit $? 18 fi 19 service drone start && echo "Drone started." 20 fi 21 22 #DEBHELPER# 23 24 exit 0