Update setup.sh
This commit is contained in:
parent
bdc1bb9b89
commit
80b0924af7
15
setup.sh
15
setup.sh
|
|
@ -19,15 +19,24 @@ cat /etc/apt/mirror.list
|
||||||
echo "-------------------------------------"
|
echo "-------------------------------------"
|
||||||
|
|
||||||
rm -f /var/run/apache2/apache2.pid
|
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"
|
echo "starting apache server"
|
||||||
service apache2 start
|
service apache2 start
|
||||||
|
|
||||||
echo "apache started..."
|
echo "apache started..."
|
||||||
|
|
||||||
|
echo "TIMEOUT is ${TIMEOUT}"
|
||||||
while true; do
|
while true; do
|
||||||
echo "[$(date)] Starting apt-mirror"
|
echo "[$(date)] Starting apt-mirror"
|
||||||
apt-mirror
|
apt-mirror
|
||||||
echo "[$(date)] Completed"
|
echo "[$(date)] Completed"
|
||||||
echo "[$(date)] Sleeping $RESYNC_PERIOD to execute apt-mirror again ======"
|
echo "[$(date)] Sleeping $TIMEOUT to execute apt-mirror again ======"
|
||||||
sleep "$RESYNC_PERIOD"
|
sleep "$TIMEOUT"
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue