I have the following script to connect to a wifi network that will allow me to automatically input the login and password on a webpage. Where should I put this script so that it launches automatically?
script:
#!/bin/sh
CURL=`which curl`
login=SAISIR LOGIN
password=SAISIR MOT DE PASSE
IWGETID=`which iwgetid`
ESSID="FreeWifi"
isFreeWifi="`$IWGETID |grep $ESSID |wc -l`"
if [ $isFreeWifi = "1" ]
then
priv=`$CURL
https://wifi.free.fr/ |grep "<input name=\"priv\" id=\"priv\" type=\"hidden\"" | sed -e 's/^.*value=\"\(.*\)\"\s.*/\1/'`
$CURL -d "login=$login&password=$password&priv=$priv&submit=Valider&url=http://www.free.fr"
https://wifi.free.fr/ espeak "FreeWifi network connected"
fi