Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

nginx
2012 year 5 month 6 day Sunday 01:49:17 MDT 

  1. #!/bin/bash
  2. # chkconfig: - 58 74
  3. #
  4.  
  5. # Source function library.
  6. . /etc/init.d/functions
  7.  
  8. # Source networking configuration.
  9. . /etc/sysconfig/network
  10.  
  11. #if [ -f /usr/local/nginx/conf/nginx.conf ];then
  12. #        . /usr/local/nginx/conf/nginx.conf
  13. #fi
  14.  
  15. RETVAL=0
  16. prog="nginx"
  17. ARGS="-c /usr/local/nginx/conf/nginx.conf"
  18.  
  19.  
  20. start() {
  21.   # Check that networking is up.
  22.   [ "$NETWORKING" = "no" ] && exit 1
  23.  
  24.         echo -n $"Starting $prog: "
  25.         daemon /usr/local/nginx/sbin/nginx $ARGS $OPTIONS
  26.   RETVAL=$?
  27.         echo
  28.         [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nginx
  29.   return $RETVAL
  30. }
  31.  
  32. stop() {
  33.         echo -n $"Shutting down $prog: "
  34.   killproc /usr/local/nginx/sbin/nginx
  35.   RETVAL=$?
  36.         echo
  37.         [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/nginx
  38.   return $RETVAL
  39. }
  40.  
  41. # See how we were called.
  42. case "$1" in
  43.   start)
  44.   start
  45.         ;;
  46.   stop)
  47.   stop
  48.         ;;
  49.   status)
  50.   status nginx
  51.   RETVAL=$?
  52.   ;;
  53.   restart|reload)
  54.   stop
  55.   start
  56.   RETVAL=$?
  57.   ;;
  58.   condrestart)
  59.   if [ -f /var/lock/subsys/nginx ]; then
  60.       stop
  61.       start
  62.       RETVAL=$?
  63.   fi
  64.   ;;
  65.   *)
  66.         echo $"Usage: $0 {start|stop|restart|condrestart|status}"
  67.         RETVAL=3
  68. esac
  69.  
  70. exit $RETVAL

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will expire by default in one month. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

worth-right fantasy-obligation fantasy-obligation