update scripts

This commit is contained in:
wt committed 2024-11-01 14:15:42 +07:00
1 parent 95e2551110
commit 4a8ea1b190
17 files changed
+381 -126

No files matched your search

+18 -14
View File
@@ -5,21 +5,25 @@
. /usr/lib/init/init-funcs.sh
#------------------------------------
start() {
otify "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)
printf "$BBLUE**$BYELLOW Starting httpd\n$RESET"
/usr/bin/httpd -h /srv/www
check $? "start httpd"
echo $(pgrep httpd) > /var/run/httpd.pid
;;
stop)
printf "$BBLUE**$BYELLOW Stopping httpd\n$RESET"
kill $(cat /var/run/httpd.pid)
check $? "stop httpd"
rm /var/run/httpd.pid
;;
restart|reload)
restart
start|stop|restart|reload|help)
"$1"
;;
*)
help