1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/sh while true; do (git fetch && git reset --hard origin) || git clone "$REPO" . && git submodule update --init git submodule update --remote hugo rm -Rf /var/www/hugo_pub mv -f ./public /var/www/hugo_pub chown -R root:www-data /var/www/hugo_pub sleep 60 done