aboutsummaryrefslogtreecommitdiff
path: root/services/docker/blog/daemon.bash
blob: 561a80aff51cb7808d3fbac7c7020643cdd6bd44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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