diff options
Diffstat (limited to 'services/docker/blog/daemon.bash')
-rwxr-xr-x | services/docker/blog/daemon.bash | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/services/docker/blog/daemon.bash b/services/docker/blog/daemon.bash new file mode 100755 index 0000000..561a80a --- /dev/null +++ b/services/docker/blog/daemon.bash @@ -0,0 +1,19 @@ +#! /usr/bin/env bash + +set -e + +# Check I'm root. +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" 1>&2 + exit 1 +fi + +hugo version + +while true; do + /scripts/update.bash + + # sleep for CRUPEST_AUTO_BACKUP_INTERVAL + echo "Sleep for $CRUPEST_BLOG_UPDATE_INTERVAL for next build..." + sleep "$CRUPEST_BLOG_UPDATE_INTERVAL" +done |