diff --git a/templates/dynamic/ext/sh b/templates/dynamic/ext/sh index 673ead1..5984c87 100755 --- a/templates/dynamic/ext/sh +++ b/templates/dynamic/ext/sh @@ -3,7 +3,7 @@ cat <<-EOF #!/bin/bash #========================================= -# Company : Boyachain +# Company : Where the f**k r u! # Create : $(date +"%F %R") # Author : Who the f**k r u! #========================================= @@ -43,7 +43,11 @@ function Func2 { } function Main { - [ -e "\$PID_FILE" ] && Error Pid file \$PID_FILE already exists, quit! + [ -e "\$PID_FILE" ] \\ + && [ -d "/proc/\$(cat \$PID_FILE)" ] \\ + && cat /proc/\$(cat \$PID_FILE)/cmdline \\ + && echo \\ + && Error Pid file \$PID_FILE already exists, quit! echo \$\$ > \$PID_FILE Warn Main ... Func1