From edd6ed4323c130fc91ea644db2458fc4d68bafba Mon Sep 17 00:00:00 2001 From: "Joseph.Rawlings" Date: Tue, 23 Dec 2025 20:15:40 -0500 Subject: [PATCH] fix: improve gitapply.sh output formatting and error handling --- gitapply.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gitapply.sh b/gitapply.sh index e957b741d..a507ff3e4 100755 --- a/gitapply.sh +++ b/gitapply.sh @@ -1,12 +1,20 @@ +#!/bin/bash + echo "Virtnet.bond Paymenter Load Balancer Git Repository Update and Apply" echo "https://gitea.virtnet.bond/Joseph.Rawlings/Virtnet.bond/" +echo "------------------------------------------------------------------------" sleep_time=$((RANDOM % 5 + 1)) cd /var/www/paymenter echo "Sleeping for $sleep_time seconds..." sleep "$sleep_time" -git pull +if ! git pull; then + echo "Git pull failed. Restarting script..." + exec "$0" "$@" +fi php artisan view:clear php artisan cache:clear systemctl restart php8.3-fpm echo "\n\n" -echo "Paymenter has been updated successfully." \ No newline at end of file +echo "------------------------------------------------------------------------" +echo "Paymenter has been updated successfully." +echo "------------------------------------------------------------------------" \ No newline at end of file