mirror of https://framagit.org/kyodev/kyopages.git
maj
This commit is contained in:
parent
50b8a4ee99
commit
3cf0df3b53
21
scripts/sdeb
21
scripts/sdeb
|
@ -1,9 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
version=11/09/2017
|
||||
version=24/09/2017
|
||||
|
||||
# $1=cmd si $2: nb de tentatives pour s'identifier, sinon 3 tentatives par défaut
|
||||
f__sudo(){ # 23/09/2017
|
||||
local nb
|
||||
[ "$2" ] && nb="$2" || nb="3"
|
||||
for (( i=1 ; i<="$nb" ; i++ )); do
|
||||
su -lc "$1"
|
||||
[ "$?" == 0 ] && break
|
||||
[ "$i" == "$nb" ] && echo " $nb échec d'authentification, recommencer"
|
||||
done
|
||||
unset i
|
||||
}
|
||||
|
||||
if [ $EUID -ne 0 ]; then
|
||||
echo "vous devez être ROOT pour installer les scripts dans le système"
|
||||
f__sudo "./sdeb"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -e "\nInstallation des scripts sdeb"
|
||||
|
@ -33,3 +47,8 @@ chmod +x getThunderbird
|
|||
./getFlashPlayer
|
||||
|
||||
./getThunderbird
|
||||
|
||||
exit 0
|
||||
|
||||
wget -O sdeb https://framagit.org/kyodev/kyopages/raw/master/scripts/sdeb
|
||||
chmod +x sdeb && ./sdeb
|
||||
|
|
Loading…
Reference in New Issue