我在Linux…上使用
$ uname -a
Linux sandbox.mydomain.com 3.4.76-65.111.amzn1.x86_64 #1 SMP Tue Jan 14 21:06:49 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux不过,如果我能在任何bash支持的环境中找到一个解决方案,那就太好了。我的问题是,在我的脚本中,我想在5秒内安排延迟重启服务器。到目前为止,我有下面的内容,但是需要60秒…
# Timed reboot of server
sudo shutdown -r 1
# Fail if any of the sub-deployments failed.
if [[ ( $PROC1_STATUS -ne 0 ) ||
( $PROC2_STATUS -ne 0 ) ||
( $PROC3_STATUS -ne 0 ) ]]
then
exit 1;
fi除了在5秒内而不是一分钟内进行定时重启外,还有人知道我如何调整上面的内容吗?解决方案不必使用“关机”,但这是我唯一能找到的工具。
发布于 2014-03-13 20:10:44
https://stackoverflow.com/questions/22389795
复制相似问题