This commit is contained in:
colben 2022-07-02 15:15:52 +08:00
parent 334db86258
commit 464e1a2ebd

View File

@ -3,7 +3,7 @@
cat <<-EOF cat <<-EOF
#!/bin/bash #!/bin/bash
#========================================= #=========================================
# Company : Boyachain # Company : Where the f**k r u!
# Create : $(date +"%F %R") # Create : $(date +"%F %R")
# Author : Who the f**k r u! # Author : Who the f**k r u!
#========================================= #=========================================
@ -43,7 +43,11 @@ function Func2 {
} }
function Main { 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 echo \$\$ > \$PID_FILE
Warn Main ... Warn Main ...
Func1 Func1