Adjusted pull logic

This commit is contained in:
Nicole Rappe 2023-09-22 02:27:55 -06:00
parent 35aaadb771
commit 8a98ee5f09

View File

@ -32,13 +32,11 @@ while true; do
if [ $LOCAL = $REMOTE ]; then if [ $LOCAL = $REMOTE ]; then
echo "Repository Up-to-date" echo "Repository Up-to-date"
elif [ $LOCAL = $BASE ]; then else
echo "Pulling Updates from Repository..." echo "Pulling Updates from Repository..."
git pull origin main git pull origin main
rsync -av --delete --exclude '.git/' ./ /DATA rsync -av --delete --exclude '.git/' ./ /DATA
curl -d "$REPO_URL Automatically Pulled Update" $NTFY_URL curl -d "$REPO_URL Automatically Pulled Update" $NTFY_URL
else
echo "Data Diverged - How exactly did this happen?"
fi fi
# Wait for 5 seconds before the next iteration # Wait for 5 seconds before the next iteration