34 lines
586 B
Desktop File
Executable File
34 lines
586 B
Desktop File
Executable File
#!/bin/sh
|
|
|
|
#--- import colors and init-funcs ---
|
|
. /usr/lib/init/colors.sh
|
|
. /usr/lib/init/init-funcs.sh
|
|
#------------------------------------
|
|
|
|
start() {
|
|
notify "Starting httpd"
|
|
/usr/bin/httpd -h /srv/www
|
|
check $? "start httpd"
|
|
echo $(pgrep httpd) > /var/run/httpd.pid
|
|
return $?
|
|
}
|
|
|
|
stop() {
|
|
notify "Stopping httpd"
|
|
kill $(cat /var/run/httpd.pid)
|
|
check $? "stop httpd"
|
|
rm /var/run/httpd.pid &> /dev/null
|
|
return $?
|
|
}
|
|
|
|
case "$1" in
|
|
start|stop|restart|reload|help)
|
|
"$1"
|
|
;;
|
|
*)
|
|
help
|
|
return 1
|
|
;;
|
|
esac
|
|
return $?
|