kyopages/scripts/sdeb

55 lines
1.3 KiB
Plaintext
Raw Normal View History

2017-08-27 15:35:08 +02:00
#!/bin/bash
2017-09-24 07:31:03 +02:00
version=24/09/2017
# $1=cmd si $2: nb de tentatives pour s'identifier, sinon 3 tentatives par défaut
2017-09-24 08:53:39 +02:00
f__sudo(){ # 24/09/2017
2017-09-24 07:31:03 +02:00
local nb
[ "$2" ] && nb="$2" || nb="3"
for (( i=1 ; i<="$nb" ; i++ )); do
2017-09-24 08:53:39 +02:00
su -c "$1"
2017-09-24 07:31:03 +02:00
[ "$?" == 0 ] && break
[ "$i" == "$nb" ] && echo " $nb échec d'authentification, recommencer"
done
unset i
}
2017-08-27 15:35:08 +02:00
if [ $EUID -ne 0 ]; then
echo "vous devez être ROOT pour installer les scripts dans le système"
2017-09-24 07:31:03 +02:00
f__sudo "./sdeb"
exit 1
2017-08-27 15:35:08 +02:00
fi
2017-08-27 17:57:48 +02:00
echo -e "\nInstallation des scripts sdeb"
echo -e "============================="
2017-08-27 15:35:08 +02:00
wget -O getInfo https://framagit.org/kyodev/kyopages/raw/master/scripts/getInfo
chmod +x getInfo
wget -O getIp https://framagit.org/kyodev/kyopages/raw/master/scripts/getIp
chmod +x getIp
wget -O getFirefox https://framagit.org/kyodev/kyopages/raw/master/scripts/getFirefox
chmod +x getFirefox
wget -O getFlashPlayer https://framagit.org/kyodev/kyopages/raw/master/scripts/getFlashPlayer
chmod +x getFlashPlayer
2017-09-11 09:24:36 +02:00
wget -O getThunderbird https://framagit.org/kyodev/kyopages/raw/master/scripts/getThunderbird
chmod +x getThunderbird
2017-08-27 15:35:08 +02:00
./getInfo -i
./getIp -i
./getFirefox
./getFlashPlayer
2017-09-11 09:24:36 +02:00
./getThunderbird
2017-09-24 07:31:03 +02:00
exit 0
wget -O sdeb https://framagit.org/kyodev/kyopages/raw/master/scripts/sdeb
chmod +x sdeb && ./sdeb