This commit is contained in:
Tom Guerin 2025-03-24 09:25:57 +01:00
parent b82a4e04cc
commit 84affee441
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#!/bin/bash
ip=$1
chemin=/root/deploy
user=root
ssh $user@$ip "mkdir $chemin" 2> /dev/null
scp createGroups.sh $user@$ip:$chemin
scp createUser.sh $user@$ip:$chemin
scp logins.csv $user@$ip:$chemin
scp Users.csv $user@$ip:$chemin
ssh $user@$ip "cd $chemin bash createGroups.sh ; bash createUsers.sh"
ssh $user@$ip "rm -R $chemin"

View File

@ -0,0 +1,14 @@
#!/bin/bash
filename=squid.conf #nom du fichier à récuperer
filepath=/etc/squid #chemin
servicename=squid.service #nom du service
git pull #mise a jour du depot distant
sudo cp $filepath/$filename $filepath/$filename.old #sauvegarde en changeant le nom .old
sudo cp ./$filename $filepath/$filename
sudo systemctl restart $servicename #restart le service