wok annotate apache/stuff/apache @ rev 16889

qupzilla: uses git now
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Mon Jul 14 07:57:56 2014 +0000 (2014-07-14)
parents 1b6281d68d9f
children 3954e94bec9b
rev   line source
erjo@4108 1 #!/bin/sh
erjo@4108 2 # /etc/init.d/apache: Start, stop and restart Apache web server on SliTaz,
erjo@4108 3 # at boot time or with the command line. Daemons options are configured
erjo@4108 4 # with /etc/daemons.conf
erjo@4108 5 #
erjo@4108 6 . /etc/init.d/rc.functions
erjo@4108 7 . /etc/daemons.conf
erjo@4108 8
erjo@4108 9 NAME=Apache
erjo@4108 10 DESC="Apache Web Server"
erjo@14809 11 DAEMON=/usr/bin/apache
erjo@4108 12 OPTIONS=
erjo@14809 13 PIDFILE=/var/run/apache/apache.pid
erjo@4108 14
erjo@4108 15 case "$1" in
erjo@4108 16 start)
erjo@14809 17 if active_pidfile $PIDFILE apache ; then
erjo@4108 18 echo "$NAME already running."
erjo@4108 19 exit 1
erjo@4108 20 fi
erjo@4108 21 echo -n "Starting $DESC: $NAME... "
erjo@4108 22 $DAEMON $OPTIONS -k start
erjo@4108 23 status
erjo@4108 24 ;;
erjo@4108 25 stop)
erjo@14809 26 if ! active_pidfile $PIDFILE apache ; then
erjo@4108 27 echo "$NAME is not running."
erjo@4108 28 exit 1
erjo@4108 29 fi
erjo@4108 30 echo -n "Stopping $DESC: $NAME... "
erjo@4108 31 $DAEMON $OPTION -k stop
erjo@4108 32 rm $PIDFILE
erjo@4108 33 status
erjo@4108 34 ;;
erjo@4108 35 reload)
erjo@14809 36 if ! active_pidfile $PIDFILE apache ; then
erjo@4108 37 echo "$NAME is not running."
erjo@4108 38 exit 1
erjo@4108 39 fi
erjo@4108 40 echo -n "Stopping $DESC: $NAME... "
erjo@4108 41 $DAEMON $OPTION -k graceful
erjo@4108 42 status
erjo@4108 43 ;;
erjo@4108 44 restart)
erjo@14809 45 if ! active_pidfile $PIDFILE apache ; then
erjo@4108 46 echo "$NAME is not running."
erjo@4108 47 exit 1
erjo@4108 48 fi
erjo@4108 49 echo -n "Restarting $DESC: $NAME... "
erjo@4108 50 $DAEMON $OPTIONS -k restart
erjo@4108 51 status
erjo@4108 52 ;;
erjo@4108 53 *)
erjo@4108 54 echo ""
erjo@4108 55 echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|reload|restart]"
erjo@4108 56 echo ""
erjo@4108 57 exit 1
erjo@4108 58 ;;
erjo@4108 59 esac
erjo@4108 60
erjo@4108 61 exit 0