【发布时间】:2017-03-30 12:57:07
【问题描述】:
首先,对不起我的英语,也是我的第一个问题(不知道我在做什么:))。我试图编辑我的 cron 作业并列出我发现的“我的”计划任务:
*/5 * * * * perl /usr/bin/hm_fix.pl > /dev/null 2<&1
脚本本身:
#!/usr/bin/perl -w
# Script to fix some migrations
$gateway = `netstat \-rn \|grep \^0\.0\.0\.0 \|awk \'\{print \$2\}\'`;
if (($gateway eq "") || ($gateway eq "\n")) {
exit 1;
}
else {
`ping -c1 $gateway`;
}
看起来像是某种“网络”搜索或类似的东西。它是安装了 Plesk 面板的 CentOs 6.5。我用谷歌搜索了脚本名称,什么也没找到……
非常感谢您的帮助。
【问题讨论】:
标签: perl centos crontab plesk netstat