diff options
Diffstat (limited to 'shutdownasap.in')
-rwxr-xr-x | shutdownasap.in | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shutdownasap.in b/shutdownasap.in index ba092f6..1cb8d4e 100755 --- a/shutdownasap.in +++ b/shutdownasap.in @@ -46,7 +46,9 @@ if ! ${intentionSet}; then echo 'shutdown' >"${tmpDir}/intention" fi -[ -r "${tmpDir}/pid" ] && kill -0 "$(cat "${tmpDir}/pid")" && exit +[ -r "${tmpDir}/pid" ] \ +&& [ -d "/proc/$(cat "${tmpDir}/pid")" ] \ +&& exit echo $$ > "${tmpDir}/pid" |