mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-10-06 13:36:10 +08:00
daily-backup: fix issue with APACHE_PORT
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
9da2235d3e
commit
7a638b8a6d
1 changed files with 9 additions and 5 deletions
|
@ -16,11 +16,15 @@ fi
|
||||||
sudo -u www-data touch "/mnt/docker-aio-config/data/daily_backup_running"
|
sudo -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 "{{.HostConfig.PortBindings}}" | grep -o '[0-9]\+' | head -1)"
|
APACHE_PORT="$(docker inspect nextcloud-aio-apache --format "{{.Config.Env}}" | grep -o 'APACHE_PORT=[0-9]\+' | grep -o '[0-9]\+' | head -1)"
|
||||||
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-apache$" && ! nc -z nextcloud-aio-apache "$APACHE_PORT"; do
|
if [ -z "$APACHE_PORT" ]; then
|
||||||
echo "Waiting for apache to become available"
|
echo "APACHE_PORT is not set which is not expected..."
|
||||||
sleep 30
|
else
|
||||||
done
|
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-apache$" && ! nc -z nextcloud-aio-apache "$APACHE_PORT"; do
|
||||||
|
echo "Waiting for apache to become available"
|
||||||
|
sleep 30
|
||||||
|
done
|
||||||
|
fi
|
||||||
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; do
|
while docker ps --format "{{.Names}}" | grep -q "^nextcloud-aio-watchtower$"; do
|
||||||
echo "Waiting for watchtower to stop"
|
echo "Waiting for watchtower to stop"
|
||||||
sleep 30
|
sleep 30
|
||||||
|
|
Loading…
Add table
Reference in a new issue