hd-backup/entrypoint.sh

24 lines
283 B
Bash
Executable File

#!/bin/ash
echo "Start container with parameter : $@"
trap sig_term SIGTERM
sig_term() {
echo "CATCH SIGTERM"
wait
exit 0
}
# Execute paramater.
exec "$@"
if [[ $DO_BACKUP == "true" ]]; then
exec /backup.sh
exit 0
fi
# Infinity roop.
while : ; do sleep 1 ; done