当前位置:论坛首页 > Windows面板

计划任务自动重启脚本出错!

2017-1-10 08:18 [复制链接] 1 5269

按照坛内的教程,设置的自动重启的脚本如下:
#!/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
使用道具 举报 只看该作者 回复
发表于 2017-1-11 10:36:49 | 显示全部楼层
请检查有没有完整复制
测试没有问题
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

企业版年付运维跟进群

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急问题处理

论坛响应时间:10分钟

问题处理方式:1对1处理(优先)

工作时间:白班:9:00 - 18:00

工作时间:晚班:18:00 - 24:00

立即付费处理

工作时间:09:00至24:00

快速回复 返回顶部 返回列表