fix: improve gitapply.sh output formatting and error handling

This commit is contained in:
2025-12-23 20:15:40 -05:00
parent aa08d57461
commit edd6ed4323

View File

@@ -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."
echo "------------------------------------------------------------------------"
echo "Paymenter has been updated successfully."
echo "------------------------------------------------------------------------"