' réorganisation ""
This commit is contained in:
29
Scripts/.deploy.sh
Normal file
29
Scripts/.deploy.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
|
||||
LOG="/home/debian/travail/deploy.log"
|
||||
REPO_PATH="/home/debian/travail/Gestion_sondes"
|
||||
DATE=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
|
||||
echo "[$DATE] 🔄 Déploiement en cours depuis Gitea (branche product)..." >> $LOG
|
||||
|
||||
cd $REPO_PATH
|
||||
|
||||
# S'assurer d'être sur la bonne branche
|
||||
git checkout product >> $LOG 2>&1
|
||||
git pull origin product >> $LOG 2>&1
|
||||
|
||||
# Redémarrer les services Supervisor
|
||||
for service in Cuisine_Saclay Monitor cuisine_meudon domo91
|
||||
do
|
||||
supervisorctl stop $service >> $LOG 2>&1
|
||||
done
|
||||
|
||||
sleep 2
|
||||
|
||||
for service in Cuisine_Saclay Monitor cuisine_meudon domo91
|
||||
do
|
||||
supervisorctl start $service >> $LOG 2>&1
|
||||
done
|
||||
|
||||
DATE_END=$(date '+%Y-%m-%d %H:%M:%S')
|
||||
echo "[$DATE_END] ✅ Déploiement terminé avec succès (branche product)" >> $LOG
|
||||
Reference in New Issue
Block a user