diff options
Diffstat (limited to 'update_apt-panopticon')
-rwxr-xr-x | update_apt-panopticon | 7 |
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. |
15 | if [ -f apt-panopticon.lock ] ; then | 15 | if [ -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 |
20 | fi | 25 | fi |