fix: improve gitapply.sh output formatting and error handling
This commit is contained in:
12
gitapply.sh
12
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."
|
||||
echo "------------------------------------------------------------------------"
|
||||
echo "Paymenter has been updated successfully."
|
||||
echo "------------------------------------------------------------------------"
|
||||
Reference in New Issue
Block a user