aboutsummaryrefslogtreecommitdiff
path: root/services/docker/blog/daemon.bash
diff options
context:
space:
mode:
Diffstat (limited to 'services/docker/blog/daemon.bash')
-rwxr-xr-xservices/docker/blog/daemon.bash19
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