#!/bin/bash
cd /var/www/html/apt-panopticon/apt-panopticon_cgp
if [ -f .git ] ; then
git pull > /dev/null
#chown -R mirrors:www-data *
fi
cd /var/www/html/apt-panopticon/apt-panopticon
if [ -f .git ] ; then
git pull > /dev/null
#chown -R mirrors:www-data *
fi
if [ ! -f apt-panopticon.lock ] ; then
rm ../results; ln -s apt-panopticon/results_old ../results
flock -n apt-panopticon.lock ./apt-panopticon.lua && rm apt-panopticon.lock
rm ../results; ln -s apt-panopticon/results ../results
fi
#chown -R mirrors:www-data /var/www/html/SledjHamr/apt-panopticon/results