命令 '"./powermon.sh"'
失败并返回126,错误消息
-sh: ./powermon.sh: /bin/sh^M: bad interpreter: No such file or directory。
这个怎么破??
不好意思,已经解决了
windows下的编码问题,用notepad编辑就好了
看了一下群晖的日志,发现每隔5分钟,日志中分别出现了Warning
内容先后是:The server was shut down due to an AC power failure or low battery of the local UPS.
AC power of local UPS was restored.
ping -c 1 192.168.1.1 > /dev/null
ret=$?
if [ $ret -eq 0 ]
then
echo ' AC Power OK ! '
else
echo ' AC Power maybe off, checking again after 2 minutes ! '
sleep 120
/volume1/sh/TG500-2.sh
fi