aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/update_apt-panopticon
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xupdate_apt-panopticon14
1 files changed, 10 insertions, 4 deletions
diff --git a/update_apt-panopticon b/update_apt-panopticon
index f2f3387..7bbe1d7 100755
--- a/update_apt-panopticon
+++ b/update_apt-panopticon
@@ -11,10 +11,16 @@ if [ -f .git ] ; then
11 #chown -R mirrors:www-data * 11 #chown -R mirrors:www-data *
12fi 12fi
13 13
14if [ ! -f apt-panopticon.lock ] ; then 14# Check if the lock file still exists.
15 rm ../results; ln -s apt-panopticon/results_old ../results 15if [ -f apt-panopticon.lock ] ; then
16 flock -n apt-panopticon.lock ./apt-panopticon.lua && rm apt-panopticon.lock 16 # Check if it's still running.
17 rm ../results; ln -s apt-panopticon/results ../results 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
18 echo "Crashed apt-panopticon detected, removing stale lock file."
19 rm apt-panopticon.lock
18fi 20fi
19 21
22rm ../results; ln -s apt-panopticon/results_old ../results
23flock -n apt-panopticon.lock ./apt-panopticon.lua && rm apt-panopticon.lock
24rm ../results; ln -s apt-panopticon/results ../results
25
20#chown -R mirrors:www-data /var/www/html/SledjHamr/apt-panopticon/results 26#chown -R mirrors:www-data /var/www/html/SledjHamr/apt-panopticon/results