sms_queuing.init 769 Bytes
Newer Older
1
#!/bin/bash
2 3 4 5 6 7 8 9
### 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
10

Daniel Stan's avatar
Daniel Stan committed
11 12
DAEMON="/usr/scripts/sip/sms_queuing"
ARGS=""
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
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