SHARE
TWEET

Untitled

a guest Nov 9th, 2012 32 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /bin/sh
  2. # /etc/init.d/restartd
  3. #
  4. # Written by Tibor Koleszar <oldw@debian.org>.
  5. # Modified by Aurélien GÃRÃME <ag@roxor.cx>.
  6.  
  7. ### BEGIN INIT INFO
  8. # Provides:          restartd
  9. # Required-Start:    $syslog
  10. # Required-Stop:     $syslog
  11. # Should-Start:      $local_fs
  12. # Should-Stop:       $local_fs
  13. # Default-Start:     2 3 4 5
  14. # Default-Stop:      0 1 6
  15. # Short-Description: Restartd daemon init.d script
  16. # Description:       Use to manage the Restartd daemon.
  17. ### END INIT INFO
  18.  
  19. set -e
  20.  
  21. DAEMON=/usr/sbin/restartd
  22. PARAMS=""
  23. PID="/var/run/restartd.pid"
  24.  
  25. test -x $DAEMON || exit 0
  26.  
  27. case "$1" in
  28.   start)
  29.     echo -n "Starting process checker: "
  30.     $DAEMON $PARAMS
  31.     echo "restartd."
  32.     ;;
  33.   stop)
  34.     echo -n "Stopping process checker: "
  35.     if kill `cat /var/run/restartd.pid 2>/dev/null` >/dev/null 2>&1
  36.     then
  37.         rm -f /var/run/restartd.pid
  38.     else
  39.         echo -n "not running: "
  40.     fi
  41.     echo "restartd."
  42.       ;;
  43.   restart)
  44.     echo -n "Stopping process checker: "
  45.     if kill `cat /var/run/restartd.pid 2>/dev/null` >/dev/null 2>&1
  46.     then
  47.         rm -f /var/run/restartd.pid
  48.     else
  49.         echo -n "not running: "
  50.     fi
  51.     echo "restartd."
  52.     echo -n "Starting process checker: "
  53.     $DAEMON $PARAMS
  54.     echo "restartd."
  55.       ;;
  56.   reload|force-reload)
  57.     echo "Reloading restartd configuration files"
  58.     kill -HUP `cat /var/run/restartd.pid`
  59.     ;;
  60.   *)
  61.     echo "Usage: /etc/init.d/restartd {start|stop|restart|reload|force-reload}"
  62.     exit 1
  63.     ;;
  64. esac
  65.  
  66. exit 0
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top