按照坛内的教程,设置的自动重启的脚本如下:
#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
if [ -f /etc/init.d/php-fpm-52 ];then
service php-fpm-52 reload
fi
if [ -f /etc/init.d/php-fpm-53 ];then
service php-fpm-53 reload
fi
if [ -f /etc/init.d/php-fpm-54 ];then
service php-fpm-54 reload
fi
if [ -f /etc/init.d/php-fpm-55 ];then
service php-fpm-55 reload
fi
if [ -f /etc/init.d/php-fpm-56 ];then
service php-fpm-56 reload
fi
if [ -f /etc/init.d/php-fpm-70 ];then
service php-fpm-70 reload
fi
myDate=`date +"%Y-%m-%d %H:%MS"`
echo "★[$myDate] PHP内存回收成功!"
echo '------------------------------------------------------------------------------';
以下是执行日志的内容,显示出错:
/www/server/cron/7fd527517371dffae413a91b86448b81: line 30: syntax error: unexpected end of file
|
|