#!/bin/sh
while true;
do
processExist=`ps aux | grep xxx | grep -v "grep" `
if [ -z "$processExist" ];then
  echo "proecss is restarted"
  cd /MyData/xxx
  nohup sh xxx.sh &
else
  echo "process is running"
fi
sleep 60
done

  

相关文章:

  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-12
  • 2021-05-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-29
  • 2022-02-10
  • 2022-12-23
  • 2021-09-17
相关资源
相似解决方案