Advertisement
Guest User

Untitled

a guest
Jun 19th, 2012
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.63 KB | None | 0 0
  1. #! /bin/sh
  2.  
  3. DAEMON=/opt/connection_manager/bin/cmanager.sh
  4. NAME=ConMgr
  5. DESC="ConMgr"
  6.  
  7. test -f $DAEMON || exit 0
  8.  
  9. set -e
  10.  
  11. case "$1" in
  12.     start)
  13.         start-stop-daemon --start --pidfile /var/run/$NAME.pid --exec $DAEMON
  14.         ;;
  15.     stop)
  16.         start-stop-daemon --stop --pidfile /var/run/$NAME.pid
  17.         ;;
  18.     restart)
  19.         start-stop-daemon --stop --pidfile /var/run/$NAME.pid
  20.         sleep 1
  21.         start-stop-daemon --start --pidfile /var/run/$NAME.pid --exec $DAEMON
  22.         ;;
  23.     *)
  24.         N=/etc/init.d/$NAME
  25.         echo "Usage: $N {start|stop|restart}" >&2
  26.         exit 1
  27.         ;;
  28. esac
  29.  
  30. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement