From e5030f489a8c579c5bbab583847d835c3be8bd10 Mon Sep 17 00:00:00 2001 From: toloveru Date: Mon, 10 Apr 2017 03:41:32 +0200 Subject: [PATCH] Catch duplicate processes --- kernelcheck | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernelcheck b/kernelcheck index 6c49ccb..12300b8 100755 --- a/kernelcheck +++ b/kernelcheck @@ -46,6 +46,7 @@ then /usr/local/sbin/notify_all "Kernel update tracker" "Verification success\!\nStarting compilation.." --icon=dialog-information else /usr/local/sbin/notify_all "Kernel update tracker" "Couldn't verify the kernel. Quitting\!" --icon=dialog-warning + rm /tmp/kernelcheck.pid exit 1 fi tar xf /tmp/linux-$latest.tar @@ -57,6 +58,7 @@ then cp /root/.config/kernel/.config /tmp/linux-$latest/.config else /usr/local/sbin/notify_all "Kernel update tracker" "No config file found\!\nAdd it to /root/.config/kernel/.config" --icon=dialog-warning + rm /tmp/kernelcheck.pid exit 1 fi /usr/local/sbin/notify_all "Kernel update tracker" "Starting kernel build..\nThis can take a while." @@ -97,5 +99,8 @@ then fi else /usr/local/sbin/notify_all "Kernel update tracker" "Internal error.. Debug time\!" --icon=dialog-warning + rm /tmp/kernelcheck.pid exit 1 fi + +rm /tmp/kernelcheck.pid \ No newline at end of file