aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2022-10-18 13:33:34 +1000
committeronefang2022-10-18 13:33:34 +1000
commitd70e8ff536c6307d9d5fea5a1044670f3b334ae9 (patch)
tree188b5385d60623d35350e6ad7d5fd2b65c532577
parentMoar chown changes. (diff)
downloadapt-panopticon-d70e8ff536c6307d9d5fea5a1044670f3b334ae9.zip
apt-panopticon-d70e8ff536c6307d9d5fea5a1044670f3b334ae9.tar.gz
apt-panopticon-d70e8ff536c6307d9d5fea5a1044670f3b334ae9.tar.bz2
apt-panopticon-d70e8ff536c6307d9d5fea5a1044670f3b334ae9.tar.xz
Actually exit when still running.
-rwxr-xr-xupdate_apt-panopticon7
1 files changed, 6 insertions, 1 deletions
diff --git a/update_apt-panopticon b/update_apt-panopticon
index ebd5e45..219d86a 100755
--- a/update_apt-panopticon
+++ b/update_apt-panopticon
@@ -14,7 +14,12 @@ fi
14# Check if the lock file still exists. 14# Check if the lock file still exists.
15if [ -f apt-panopticon.lock ] ; then 15if [ -f apt-panopticon.lock ] ; then
16 # Check if it's still running. 16 # Check if it's still running.
17 ps ax -eo pid,args | grep "luajit ./apt-panopticon.lua" | grep -v "grep luajit ./apt-panopticon.lua" | while read line ; do echo "Previous apt-panopticon still running, exiting." exit 1 ; done 17 ps ax -eo pid,args | grep "luajit ./apt-panopticon.lua" | grep -v "grep luajit ./apt-panopticon.lua" | while read line ; do touch apt-panopticon.running ; exit ; done
18 if [ -f apt-panopticon.running ] ; then
19 echo "Previous apt-panopticon still running, exiting."
20 rm apt-panopticon.running
21 exit 1
22 fi
18 echo "Crashed apt-panopticon detected, removing stale lock file." 23 echo "Crashed apt-panopticon detected, removing stale lock file."
19 rm apt-panopticon.lock 24 rm apt-panopticon.lock
20fi 25fi