Subversion Repositories ALCASAR

Compare Revisions

No changes between revisions

Ignore whitespace Rev 2992 → Rev 2990

/scripts/alcasar-mail-install-V2.sh
1,13 → 1,15
#!/bin/bash
 
###########################################################################################
##
## ALCASAR SERVICE MAIL INSTALL
##
## Script by joss_p
## This script configure the mail conf file and execute the configuration from the acc.
##
###########################################################################################
##############################################################################################################################
##
## ALCASAR SERVICE MAIL INSTALL
##
## Script by joss_p
## V 1.0 Dec 2021.
## This script configure the mail conf file and execute the fonfiguration from the acc.
##
##
##############################################################################################################################
 
#. /usr/local/etc/alcasar-mail.conf
 
61,6 → 63,8
done
fi
 
 
 
if [[ $TYPE_MAIL -eq 2 ]]; then
echo "relayhost = [${smtp}]:${port}" >> /etc/postfix/main.cf
elif [[ $TYPE_MAIL -eq 3 ]]; then
75,6 → 79,7
echo "Erreur ! Aucun type de messagerie sélectionné !"
exit 0
fi
 
old_smtpIP=`grep "SMTP_IP=" /usr/local/etc/alcasar-iptables-local.sh | cut -d "'" -f2`
old_port=`grep "SMTP_PORT=" /usr/local/etc/alcasar-iptables-local.sh | cut -d "=" -f2 | cut -f1`
sed -ie "/SMTP_IP=/ s@${old_smtpIP}@${smtpIP}@" /usr/local/etc/alcasar-iptables-local.sh
84,4 → 89,5
#chmod 740 /usr/local/etc/alcasar-iptables-local.sh
#chmod 700 /usr/local/bin/alcasar-iptables.sh
bash /usr/local/bin/alcasar-iptables.sh
 
exit 0
/scripts/patch/alcasar-freeradius-up.sh
0,0 → 1,35
# june 2019 - due to an update of freeradius, the conf files have been reset
# This patch create again the ALCASAR conf for freeradius
 
CONF_FILE="/usr/local/etc/alcasar.conf"
current_version=`grep ^VERSION= $CONF_FILE |cut -d"=" -f2`
maj_version=`echo $current_version|cut -d"." -f1`
min_version=`echo $current_version|cut -d"." -f2`
 
if [ $maj_version = "3" ] & [ $min_version = "3" ]
then
# Add ALCASAR & Coovachilli dictionaries
echo "ALCASAR version 3.3"
cp /usr/share/freeradius/dictionary.alcasar /etc/raddb
cp /usr/share/freeradius/dictionary.coovachilli /etc/raddb
[ -e /etc/raddb/dictionary.default ] || cp /etc/raddb/dictionary /etc/raddb/dictionary.default
echo '$INCLUDE dictionary.alcasar' > /etc/raddb/dictionary
echo '$INCLUDE dictionary.coovachilli' >> /etc/raddb/dictionary
elif [ $maj_version = "3" ] & [ $min_version = "2" ]
then
echo "ALCASAR version 3.2"
rm -f /etc/raddb/dictionary.alcasar
rm -f /etc/raddb/dictionary.coovachilli
[ -e /etc/raddb/dictionary.default ] && mv /etc/raddb/dictionary.default /etc/raddb/dictionary
fi
# Set only usefull modules for ALCASAR (! the module 'ldap-alcasar' is enabled only via ACC)
rm -rf /etc/raddb/mods-enabled/*
for mods in sql sqlcounter attr_filter expiration logintime pap expr always
do
ln -s /etc/raddb/mods-available/$mods /etc/raddb/mods-enabled/$mods
done
# Set Virtual server (remvove all except "alcasar virtual site")
rm -f /etc/raddb/sites-enabled/*
ln -s /etc/raddb/sites-available/alcasar /etc/raddb/sites-enabled/alcasar
systemctl start radiusd.service
/usr/local/bin/alcasar-daemon.sh
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
Added: svn:executable
+*
\ No newline at end of property