mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-22 07:26:55 +00:00
daily-bakup.sh: fix issue with apache-port
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
cd8158c9f6
commit
7fa5af0e8c
1 changed files with 3 additions and 3 deletions
|
|
@ -23,8 +23,8 @@ fi
|
||||||
sudo -E -u www-data touch "/mnt/docker-aio-config/data/daily_backup_running"
|
sudo -E -u www-data touch "/mnt/docker-aio-config/data/daily_backup_running"
|
||||||
|
|
||||||
# Check if apache is running/stopped, watchtower is stopped and backupcontainer is stopped
|
# Check if apache is running/stopped, watchtower is stopped and backupcontainer is stopped
|
||||||
APACHE_PORT="$(docker inspect nextcloud-aio-apache --format "{{.Config.Env}}" | grep -o 'APACHE_PORT=[0-9]\+' | grep -o '[0-9]\+' | head -1)"
|
LOCAL_APACHE_PORT="$(docker inspect nextcloud-aio-apache --format "{{.Config.Env}}" | grep -o 'APACHE_PORT=[0-9]\+' | grep -o '[0-9]\+' | head -1)"
|
||||||
if [ -z "$APACHE_PORT" ]; then
|
if [ -z "$LOCAL_APACHE_PORT" ]; then
|
||||||
echo "APACHE_PORT is not set which is not expected..."
|
echo "APACHE_PORT is not set which is not expected..."
|
||||||
else
|
else
|
||||||
# Connect mastercontainer to nextcloud-aio network to make sure that nextcloud-aio-apache is reachable
|
# Connect mastercontainer to nextcloud-aio network to make sure that nextcloud-aio-apache is reachable
|
||||||
|
|
@ -32,7 +32,7 @@ else
|
||||||
docker network connect nextcloud-aio nextcloud-aio-mastercontainer &>/dev/null
|
docker network connect nextcloud-aio nextcloud-aio-mastercontainer &>/dev/null
|
||||||
|
|
||||||
# Wait for apache to start
|
# Wait for apache to start
|
||||||
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-apache$" && ! nc -z nextcloud-aio-apache "$APACHE_PORT"; do
|
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-apache$" && ! nc -z nextcloud-aio-apache "$LOCAL_APACHE_PORT"; do
|
||||||
echo "Waiting for apache to become available"
|
echo "Waiting for apache to become available"
|
||||||
sleep 30
|
sleep 30
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue