From 2bc42048b17a5e334aa54b982979854aabbf073e Mon Sep 17 00:00:00 2001 From: Justin Paul Date: Sat, 1 Apr 2023 18:49:35 -0400 Subject: [PATCH] Create getupdates.sh --- cron/getupdates.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cron/getupdates.sh diff --git a/cron/getupdates.sh b/cron/getupdates.sh new file mode 100644 index 0000000..601ac38 --- /dev/null +++ b/cron/getupdates.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# change to the zroc directory +cd /home/zroc/zroc + +# pull any updates from the git repository +git pull + +# check if there are any changes +if [[ $(git diff HEAD@{1} HEAD) ]]; then + # if there are changes, run docker-compose up with force-restart + docker-compose up -d --force-restart +fi