scripts/sip/sms_queuing.init
2013-06-23 17:00:56 +02:00

36 lines
784 B
Bash
Executable file

#!/bin/bash
### BEGIN INIT INFO
# Provides: sms_queuing
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Asterisk sms delivery
### END INIT INFO
DAEMON="/usr/bin/python"
ARGS="/usr/scripts/sip/sms_queuing"
PIDFILE="/var/run/sms_queuing.pid"
USER="asterisk"
case "$1" in
start)
echo "Starting server"
/sbin/start-stop-daemon --start --pidfile $PIDFILE \
--user $USER --group $USER \
-b --make-pidfile \
--chuid $USER \
--exec $DAEMON $ARGS
;;
stop)
echo "Stopping server"
/sbin/start-stop-daemon --stop --pidfile $PIDFILE --verbose
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0