一个简单的控制apache服务的shell脚本
下面展示一些 内联代码片
。
// A code block
var foo = 'bar';
#!/bin/bash
read -p "please enter your choice:" G
case $G in
start)
systemctl start httpd && echo " shttpd is start"||echo " start error"
;;
stop)
systemctl stop httpd && echo " httpd is stop" || echo " stop error"
;;
restart)
systemctl restart httpd && echo " http is restart"||echo " restart error"
;;
status)
systemctl status httpd && echo -e
;;
quit)
exit
;;
*)
echo " error input"
esac