Go to most recent revision | Blame | Compare with Previous | Last modification | View Log
#!/bin/bash
# alcasar-wifi4eu.sh
# by Rexy
# This script is distributed under the Gnu General Public License (GPL)
# active ou désactive l'affichage du logo WIFI4EU (+ intégration de leur échantillon de code)
# enable or disable the display of WIFI4EU logo (+ integration of their snippet)
SED="/bin/sed -i"
CONF_FILE="/usr/local/etc/alcasar.conf"
HOSTNAME=$(grep ^HOSTNAME= $CONF_FILE | cut -d'=' -f2)
DOMAIN=$(grep ^DOMAIN= $CONF_FILE | cut -d'=' -f2)
usage="Usage: alcasar-wifi4eu.sh {--on | -on} | {--off | -off}"
nb_args=$#
args=$1
if [ $nb_args -eq 0 ]
then
echo "$usage"
exit 1
fi
case $args in
-\? | -h* | --h*)
echo "$usage"
exit 0
;;
--off | -off)
$SED "s?^WIFI4EU=.*?WIFI4EU=off?" $CONF_FILE
;;
--on | -on)
$SED "s?^WIFI4EU=.*?WIFI4EU=on?" $CONF_FILE
;;
*)
echo "Argument inconnu : $1"
echo "$usage"
exit 1
;;
esac