From 18d210aae8b6926d347007cd30c5d7c71d242e76 Mon Sep 17 00:00:00 2001 From: Moon Moon Date: Sun, 19 Apr 2026 04:42:40 +0200 Subject: [PATCH] updates --- update-site.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 update-site.sh diff --git a/update-site.sh b/update-site.sh new file mode 100644 index 0000000..fc799bf --- /dev/null +++ b/update-site.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +set -e + +cd /home/prodesk/webpage + +git fetch origin main + +LOCAL=$(git rev-parse HEAD) +REMOTE=$(git rev-parse origin/main) + +if [ "$LOCAL" != "$REMOTE" ]; then + echo "$(date): Updates found, pulling..." + git pull origin main + + echo "$(date): Restarting docker container..." + docker restart 9c84412e722e + + echo "$(date): Update complete." +else + echo "$(date): No updates." +fi