From a4317ecec75b6eb5d63c255bec8c658b9258a81d Mon Sep 17 00:00:00 2001 From: Elijah Perrault Date: Fri, 21 Jan 2011 00:14:42 -0700 Subject: [PATCH] Delete auto.pid on shutdown. --- bin/auto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/auto b/bin/auto index c658e20..099ca6b 100755 --- a/bin/auto +++ b/bin/auto @@ -248,6 +248,9 @@ sub signal_TERM API::IRC::quit($_, "Caught SIGTERM") foreach (keys %SOCKET); dbug "!!! Caught SIGTERM; terminating..."; alog "!!! Caught SIGTERM; terminating..."; + if (-e "$Bin/auto.pid") { + `rm $Bin/auto.pid`; + } sleep 1; exit; } @@ -258,6 +261,9 @@ sub signal_INT API::IRC::quit($_, "Caught SIGINT") foreach (keys %SOCKET); dbug "!!! Caught SIGINT; terminating..."; alog "!!! Caught SIGINT; terminating..."; + if (-e "$Bin/auto.pid") { + `rm $Bin/auto.pid`; + } sleep 1; exit; }