app_name='pay-data-platform'
app_path=$(cd $(dirname $0); pwd)
command=$1
cmd_nginx="${app_path}/webserver/loadnginx.sh"
cmd_fpm="${app_path}/php/sbin/php-fpm"
if [ "$command" == 'start' ]; then
$cmd_fpm start
$cmd_nginx start
elif [ "$command" == 'restart' ]; then
$cmd_fpm restart
$cmd_nginx restart
elif [ "$command" == 'stop' ]; then
$cmd_nginx stop
$cmd_fpm stop
fi

这是一个用于管理和控制PHP-FPM及Nginx服务的自动化脚本。通过判断接收到的命令(start、restart或stop),脚本会相应地启动、重启或停止这两个服务。此脚本对于维护Web服务器的日常操作非常实用。

被折叠的 条评论
为什么被折叠?



