mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-12 16:31:25 +00:00
~重写 set_cron.sh 尝试修复因为定时任务导致系统crontab内容丢失的问题
This commit is contained in:
@@ -4,7 +4,7 @@ PIDFILE="/tmp/ShellCrash/$1.pid"
|
||||
|
||||
if [ -f "$PIDFILE" ]; then
|
||||
PID="$(cat "$PIDFILE")"
|
||||
if [ -n "$PID" ] && kill -0 "$PID" 2>/dev/null; then
|
||||
if [ -n "$PID" ] && [ -d "/proc/$PID" ]; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user