6416dd8731
If the Nextcloud container is recreated while the cronjob container is still running, the ID of the container is obtained each time the cron tasks are executed. Previously it was cached on entrypoint, so if the ID changed this container would fail.
8 lines
249 B
Bash
Executable file
8 lines
249 B
Bash
Executable file
#!/usr/bin/env bash
|
|
set -x
|
|
|
|
# Make sure cron daemon is still running
|
|
ps -o comm | grep crond || exit 1
|
|
|
|
# Make sure the target container is still running/available
|
|
docker inspect -f '{{.State.Running}}' "$(/find-container.sh)" | grep true || exit 1
|