« Script Bash Linux pour l'utilisation de Zerotier » : différence entre les versions

De www.yakakliker.org
Aucun résumé des modifications
Aucun résumé des modifications
 
(3 versions intermédiaires par le même utilisateur non affichées)
Ligne 132 : Ligne 132 :
[[Catégorie:Linux]]
[[Catégorie:Linux]]
[[Catégorie:Zerotier]]
[[Catégorie:Zerotier]]
‎<html>
<script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script>
<script>
  kofiWidgetOverlay.draw('yakakliker', {
    'type': 'floating-chat',
    'floating-chat.donateButton.text': 'Café',
    'floating-chat.donateButton.background-color': '#00b9fe',
    'floating-chat.donateButton.text-color': '#fff'
  });
</script>
‎</html>
‎<html>
<a href="https://www.compteurdevisite.com" title="compteur web gratuit sans pub"><img src="https://counter6.optistats.ovh/private/compteurdevisite.php?c=b4epghealnwlf7wuq7gn3ygll9aywrfx" border="0" title="compteur web gratuit sans pub" alt="compteur web gratuit sans pub"></a>
‎</html>

Dernière version du 17 février 2025 à 14:38

#!/bin/bash

## Les variables

: ${VAR01=whiptail}

#####################################################

fct001(){

sudo apt-get update -y

sudo curl -s https://install.zerotier.com | sudo bash

}

######################################################

fct002(){

ID=$(whiptail --inputbox "Votre ID réseau ?" 8 39  --title "ID Réseau" 3>&1 1>&2 2>&3)

exitstatus=$?

if [ $exitstatus = 0 ]; then

sudo zerotier-cli join $ID

else

    echo "Annulation."

fi

}

########################################################

fct003(){

ID=$(whiptail --inputbox "Votre ID réseau ?" 8 39  --title "ID Réseau" 3>&1 1>&2 2>&3)

exitstatus=$?

if [ $exitstatus = 0 ]; then

sudo zerotier-cli leave $ID

else

    echo "Annulation."

fi

}

########################################################

fct004(){

sudo zerotier-cli listnetworks

}

########################################################

fct005(){

sudo zerotier-cli status

}

########################################################

fct006(){

sudo systemctl restart zerotier-one

}

############################################################

if (whiptail --title "Zerotier" --yesno "Continuer ?" 8 78); then

OPTION=$(whiptail --title "Zerotier" --menu "Que souhaitez vous faire ?" 15 60 6 \

"fct001" "    Installer Zerotier" \

"fct002" "    Vous connecter" \

"fct003" "    Vous déconnecter" \

"fct004" "    Lister les connexions réseau" \

"fct005" "    Connaitre l'état du client Zerotier" \

"fct006" "    Redémarrer le service Zerotier" 3>&1 1>&2 2>&3) 

exitstatus=$?

if [ $exitstatus = 0 ]; then

#    echo "Vous avez choisi la distribution : " $OPTION

$OPTION

else

    echo "vous avez annulé"

fi

#########################################################

## Fin du script

else

	echo "Fin."

fi


Liens

https://raw.githubusercontent.com/Yakakliker37/Base_info/main/Zerotier.sh

compteur web gratuit sans pub