Line 109:
Line 109:
kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE"
kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE"
echo 'Service stopped' >&2
echo 'Service stopped' >&2
−
}
−
−
uninstall() {
−
echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
−
local SURE
−
read SURE
−
if [ "$SURE" = "yes" ]; then
−
stop
−
rm -f "$PIDFILE"
−
echo "Notice: log file is not be removed: '$LOGFILE'" >&2
−
update-rc.d -f <NAME> remove
−
rm -fv "$0"
−
fi
}
}
Line 148:
Line 135:
status)
status)
status
status
−
;;
−
uninstall)
−
uninstall
;;
;;
restart)
restart)
Line 157:
Line 141:
;;
;;
*)
*)
−
echo "Usage: $0 {start|stop|status|restart|uninstall}"
+
echo "Usage: $0 {start|stop|status|restart}"
esac
esac