#!/bin/bash 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