Skip to content
Snippets Groups Projects
Commit 48eb1736 authored by Elliott Shugerman's avatar Elliott Shugerman
Browse files

support null $SCHEDULE

parent c036e13e
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,5 @@ This project is a fork and re-structuring of schickling's [postgres-backup-s3](h ...@@ -57,6 +57,5 @@ This project is a fork and re-structuring of schickling's [postgres-backup-s3](h
- backup blobs and all schemas by default - backup blobs and all schemas by default
- drop and re-create all database objects on restore - drop and re-create all database objects on restore
- some env vars renamed or removed - some env vars renamed or removed
- `SCHEDULE` env var is required (but backups can still be triggered ad-hoc)
- filter backups on S3 by database name - filter backups on S3 by database name
...@@ -7,7 +7,9 @@ if [ "$S3_S3V4" = "yes" ]; then ...@@ -7,7 +7,9 @@ if [ "$S3_S3V4" = "yes" ]; then
fi fi
if [ -z "$SCHEDULE" ]; then if [ -z "$SCHEDULE" ]; then
echo "You need to set the SCHEDULE environment variable." # TODO: how to make CTRL-C work?
echo "WARNING: $SCHEDULE is null. Going to sleep."
tail -f /dev/null # do nothing forever
else else
exec go-cron "$SCHEDULE" /bin/sh backup.sh exec go-cron "$SCHEDULE" /bin/sh backup.sh
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment