From b597f0afa841872c32829f4e6ab76a34599846da Mon Sep 17 00:00:00 2001 From: "jeremy.thomas" Date: Wed, 26 Mar 2025 15:53:55 +0100 Subject: [PATCH] Ajout de la qj10 --- sisr1/gitpush.sh | 16 ++++++++++++++++ sisr1/tp05-Installation_proxy/majservice.sh | 12 ++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 sisr1/gitpush.sh create mode 100644 sisr1/tp05-Installation_proxy/majservice.sh diff --git a/sisr1/gitpush.sh b/sisr1/gitpush.sh new file mode 100644 index 0000000..aad5616 --- /dev/null +++ b/sisr1/gitpush.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [ -z "$1" ] ; then + read -p "Erreur: Ecrivez un message " $message +else + message="$1" +fi + +# Ajout des fichiers modifiers +git add . + +# Commit avec le message +git commit -m "$message" + +# Push vers le dépot +git push -u https://jeremy.thomas@gitea.lyc-lecastel.fr/jeremy.thomas/siotp.git \ No newline at end of file diff --git a/sisr1/tp05-Installation_proxy/majservice.sh b/sisr1/tp05-Installation_proxy/majservice.sh new file mode 100644 index 0000000..5c92202 --- /dev/null +++ b/sisr1/tp05-Installation_proxy/majservice.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +filename=squid.conf # nom du fichier +filepath=/etc/squid # emplacement du fichier +servicename=squid.service # nom du service + +git pull # mise à jour du fichier de config du dépôt + +sudo cp $filepath/$filename $filepath/$filename.old # sauvegarde fichier précédent +sudo cp ./$filename $filename/$filename # copie du fichier de config mis à jour son emplacement + +sudo systemctl restart $servicename # redémarrage du service associé \ No newline at end of file