2021-05-21 16:30:09 +02:00
|
|
|
#!/bin/bash
|
2021-06-24 16:20:02 +02:00
|
|
|
#Se script se charge de se connecter au serveur scodoc et supprimer le département donné en paramètre
|
2021-05-21 16:30:09 +02:00
|
|
|
if [ "$#" -ne 2 ];
|
|
|
|
then
|
|
|
|
echo "Pas assez d'arguments"
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
ssh $1 /bin/bash<< EOF
|
2021-08-06 11:35:06 +02:00
|
|
|
cd /opt/scodoc/tools
|
2021-05-21 16:30:09 +02:00
|
|
|
./delete_dept.sh -n ${2}
|
|
|
|
EOF
|
2021-08-06 11:35:06 +02:00
|
|
|
# ssh $1 'systemctl restart scodoc'
|