Files
amadeus_26_fb/monitor.sh
2019-04-14 17:12:43 +08:00

12 lines
168 B
Bash
Executable File

#!/bin/sh
exe=$1
while true; do
state=`ps aux | grep "$1" | grep -v grep | grep -v $0`
if [ ! "$state" ]; then
exec $exe &
echo "restart $exe"
fi
sleep 2
done