daily pastebin goal
70%
SHARE
TWEET

Untitled

a guest May 17th, 2018 105 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:     memcached
  4. # Required-Start:   $syslog
  5. # Required-Stop:    $syslog
  6. # Should-Start:     $local_fs
  7. # Should-Stop:      $local_fs
  8. # Default-Start:    2 3 4 5
  9. # Default-Stop:     0 1 6
  10. # Short-Description:    memcached - Memory caching daemon
  11. # Description:      memcached - Memory caching daemon
  12. ### END INIT INFO
  13.  
  14.  
  15. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  16. DAEMON=/usr/local/bin/memcached
  17. DAEMONBOOTSTRAP=/usr/share/memcached/scripts/start-memcached
  18. NAME=memcached
  19. DESC=memcached
  20. PIDFILE=/var/run/$NAME.pid
  21.  
  22. test -x $DAEMON || exit 0
  23. test -x $DAEMONBOOTSTRAP || exit 0
  24.  
  25. set -e
  26.  
  27. case "$1" in
  28.   start)
  29.     echo -n "Starting $DESC: "
  30.     start-stop-daemon --start --quiet --exec $DAEMONBOOTSTRAP
  31.     echo "$NAME."
  32.     ;;
  33.   stop)
  34.     echo -n "Stopping $DESC: "
  35.     start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
  36.     echo "$NAME."
  37.     rm -f $PIDFILE
  38.     ;;
  39.  
  40.   restart|force-reload)
  41.     #
  42.     #   If the "reload" option is implemented, move the "force-reload"
  43.     #   option to the "reload" entry above. If not, "force-reload" is
  44.     #   just the same as "restart".
  45.     #
  46.     echo -n "Restarting $DESC: "
  47.     start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
  48.     rm -f $PIDFILE
  49.     sleep 1
  50.     start-stop-daemon --start --quiet --exec $DAEMONBOOTSTRAP
  51.     echo "$NAME."
  52.     ;;
  53.   *)
  54.     N=/etc/init.d/$NAME
  55.     # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
  56.     echo "Usage: $N {start|stop|restart|force-reload}" >&2
  57.     exit 1
  58.     ;;
  59. esac
  60.  
  61. 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