Skip to content

Instantly share code, notes, and snippets.

@88250
Created March 13, 2018 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 88250/1a194f0147a8c778f2f1949a1ade5e9d to your computer and use it in GitHub Desktop.
Save 88250/1a194f0147a8c778f2f1949a1ade5e9d to your computer and use it in GitHub Desktop.
进程守护脚本
#!/bin/bash
echo `date`
ps -fe|grep geth |grep -v grep # 查看进程是否存在
if [ $? -ne 0 ]
then
/root/geth.sh # 进程不存在的话调用启动脚本
else
echo "running....."
fi
echo `date`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment