添加monitor.sh的使用方法

This commit is contained in:
xinyang
2019-04-28 13:09:40 +08:00
committed by GitHub
parent 2dad2d864a
commit 4015ee5910

View File

@@ -1,5 +1,8 @@
#!/bin/sh
# usage: monitor.sh "<the exe file's absolute path and its shell parameter>"
# And then when ever the exe shutdonw it will be automatically restart
exe=$1
while true; do
state=`ps aux | grep "$1" | grep -v grep | grep -v $0`