guopengfa
发布于 2022-10-09 / 1465 阅读 / 0 评论 / 0 点赞

Linux Shell Notes

shell 1: monitor progressing status, if not exist restart it.

#!/bin/bash
while true
do
procnum=` lsof -i:18080 | wc -l`
if [ $procnum -eq 0 ]; then
sh /data/xieyi/xieyi/service.sh start
fi
echo '休眠1'
sleep 1
echo '休眠2'
done

评论