diff options
Diffstat (limited to '')
-rwxr-xr-x | update_apt-panopticon | 14 |
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 * |
12 | fi | 12 | fi |
13 | 13 | ||
14 | if [ ! -f apt-panopticon.lock ] ; then | 14 | # Check if the lock file still exists. |
15 | rm ../results; ln -s apt-panopticon/results_old ../results | 15 | if [ -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 | ||
18 | fi | 20 | fi |
19 | 21 | ||
22 | rm ../results; ln -s apt-panopticon/results_old ../results | ||
23 | flock -n apt-panopticon.lock ./apt-panopticon.lua && rm apt-panopticon.lock | ||
24 | rm ../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 |