first commit

This commit is contained in:
PaulVua
2025-01-09 14:09:21 +01:00
parent 531f0ef740
commit 3081e43a1a
96 changed files with 65961 additions and 1 deletions

28
connexion.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
echo "-------"
echo "Start connexion shell script at $(date)"
#disable hotspot
echo "Disable Hotspot:"
sudo nmcli connection down Hotspot
sleep 10
echo "Start connection with:"
echo "SSID: $1"
echo "Password: $2"
sudo nmcli device wifi connect "$1" password "$2"
#check if connection is successfull
if [ $? -eq 0 ]; then
echo "Connection to $1 is successfull"
else
echo "Connection to $1 failed"
echo "Restarting hotspot..."
#enable hotspot
sudo nmcli connection up Hotspot
fi
echo "End connexion shell script"
echo "-------"