Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1668 → Rev 1670

/CHANGELOG
8,6 → 8,7
NEWS
- integration of an internal DNS in automatic configuration (alcasar-dns-local.sh)
- show user info in the "activity" screen (if set)
- "SMS autoregistration" link in the intercept page (if the service is enabled)
------------------------2.9 ------------------------
 
BUGS
/scripts/alcasar-sms.sh
35,6 → 35,7
script="/usr/local/bin/alcasar-sms.sh"
public_page="/var/www/html/autoregistrationinfo.php"
index_page="/var/www/html/index.php"
intercept_page="/var/www/html/intercept.php"
separator="########## START ##########"
end="%%%%%%%%%% STOP %%%%%%%%%%"
 
251,8 → 252,7
d_exp=$(date --date "$date_expiration" +%s)
d_scr=$(date --date "$date_script" +%s)
 
 
if test $d_scr -gt $d_exp # Si le ban à expiré
if test $d_scr -ge $d_exp # Si le ban à expiré
then
 
# Test sur le nombre de mots (resultat)
336,28 → 336,30
;;
--start)
gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
if [ $gammu_pid != "0" ]
then
echo "gammu is already started"
else
start_gammu
sed -i "s/\$service_SMS_status=\"false\";/\$service_SMS_status=\"true\";/g" $index_page
sed -i "s/\$service_SMS_status=false;/\$service_SMS_status=true;/g" $public_page
fi
exit 0
;;
--stop)
gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
if [ $gammu_pid != "0" ]
then
stop_gammu
sed -i "s/\$service_SMS_status=\"true\";/\$service_SMS_status=\"false\";/g" $index_page
sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $public_page
else
echo "gammu is already stopped"
fi
exit 0
;;
if [ $gammu_pid != "0" ]
then
echo "gammu is already started"
else
start_gammu
sed -i "s/\$service_SMS_status=\"false\";/\$service_SMS_status=\"true\";/g" $index_page
sed -i "s/\$service_SMS_status=false;/\$service_SMS_status=true;/g" $public_page
sed -i "s/\$service_SMS_status=false;/\$service_SMS_status=true;/g" $intercept_page
fi
exit 0
;;
--stop)
gammu_pid=`/usr/sbin/pidof gammu-smsd|wc -l`
if [ $gammu_pid != "0" ]
then
stop_gammu
sed -i "s/\$service_SMS_status=\"true\";/\$service_SMS_status=\"false\";/g" $index_page
sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $public_page
sed -i "s/\$service_SMS_status=true;/\$service_SMS_status=false;/g" $intercept_page
else
echo "gammu is already stopped"
fi
exit 0
;;
--pidof)
/sbin/pidof gammu-smsd
;;
/scripts/sbin/alcasar-uninstall.sh
21,7 → 21,7
 
for i in alcasar-load_balancing havp freshclam ntpd dansguardian httpd radiusd mysqld dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole tinyproxy nfsen chilli fail2ban iptables ulogd-ext-access ulogd-ssh ulogd-traceability vnstat
do
[ -e /lib/systemd/system/$i.service ] && /usr/bin/systemctl stop $i.service && /usr/bin/systemctl disable $i.service 1>/dev/null
[ -e /lib/systemd/system/$i.service ] && /usr/bin/systemctl disable $i.service && /usr/bin/systemctl stop $i.service 1>/dev/null
done
 
echo "Reset ALCASAR main functions : "
/web/intercept.php
238,7 → 238,8
$l_reply_6 = "Votre durée de connexion autorisée a été atteinte";
$l_online_time = "Temps de connexion";
$l_remaining_time = "Temps restant";
$l_uam_domain = "Sites autorisés : ";}
$l_uam_domain = "Sites autorisés : ";
$l_autoregistration = "Auto enregistrement (sms)";}
else{
$l_ChilliError = "The authentication must be successful through the captive portal service.";
$l_login = "Successful authentication.<HR>Closing this window interrupts your session";
271,6 → 272,7
$l_online_time = "Online time";
$l_remaining_time = "Remaining time";
$l_uam_domain = "Authorized websites : ";
$l_autoregistration = "Auto registration (sms)";
}
 
# If https not use, tell it's wrong
454,12 → 456,21
<td align=\"right\">$l_password</td>
<td align=\"left\"><INPUT maxLength=\"32\" type=\"password\" name=\"Password\" autocomplete=\"off\"></td>
</tr>
<tr>";
";
 
echo "</td><td height=\"23\" align=\"left\"><INPUT value=\"$l_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$statuspath')\"></td>
echo " </tr>
<td height=\"23\" align=\"left\"><INPUT value=\"$l_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$statuspath')\"></td>
";
 
echo "</table>
 
$service_SMS_status=false;
if($service_SMS_status){
echo " <td><a href=\"./autoregistrationinfo.php\">".$l_autoregistration."</a></td>";
}
 
echo " </tr>
</table>
 
</form>
<table id=\"boite-info\" cellSpacing=\"0\" cellPadding=\"0\" width=\"80%\">
<tr>