diff --git a/setup.sh b/setup.sh index eed8fed..f512099 100755 --- a/setup.sh +++ b/setup.sh @@ -19,15 +19,24 @@ cat /etc/apt/mirror.list echo "-------------------------------------" rm -f /var/run/apache2/apache2.pid + +echo "hacking www-data to become PUID=$PUID PGID=$PGID" +SEDEX="s/www-data:x:[0-9]+:[0-9]+:/www-data:x:${PUID}:${PGID}:/g" +echo "sed /etc/passwd with [$SEDEX]" +cat /etc/passwd | \ +sed -E $SEDEX > /tmp/passy +cp /tmp/passy /etc/passwd +rm /tmp/passy + echo "starting apache server" service apache2 start - echo "apache started..." +echo "TIMEOUT is ${TIMEOUT}" while true; do echo "[$(date)] Starting apt-mirror" apt-mirror echo "[$(date)] Completed" - echo "[$(date)] Sleeping $RESYNC_PERIOD to execute apt-mirror again ======" - sleep "$RESYNC_PERIOD" + echo "[$(date)] Sleeping $TIMEOUT to execute apt-mirror again ======" + sleep "$TIMEOUT" done