/alcasar.sh |
---|
116,13 → 116,13 |
} # End of header_install() |
######################################################## |
## Function "testing" ## |
## Function "testing_system" ## |
## - Test Mageia version ## |
## - Test ALCASAR version (if already installed) ## |
## - Test free space on /var (>10G) ## |
## - Test Internet access ## |
######################################################## |
testing() |
testing_system() |
{ |
# Test of Mageia version |
# extract the current Mageia version and hardware architecture (i586 ou X64) |
211,12 → 211,7 |
then |
rm -f /var/tmp/alcasar-conf* |
else |
# Retrieve former NICname |
EXTIF_saved=`grep ^EXTIF= $CONF_FILE | cut -d'=' -f2-` # EXTernal InterFace |
INTIF_saved=`grep ^INTIF= $CONF_FILE | cut -d'=' -f2-` # INTernal InterFace |
[ "$(/usr/sbin/ip link | grep -c " $EXTIF_saved:")" -ne 0 ] && EXTIF=$EXTIF_saved || echo "Warning: Network card \"$EXTIF_saved\" is not connected, so \"$EXTIF\" will be used for external network." |
[ "$(/usr/sbin/ip link | grep -c " $INTIF_saved:")" -ne 0 ] && INTIF=$INTIF_saved || echo "Warning: Network card \"$INTIF_saved\" is not connected, so \"$INTIF\" will be used for internal network." |
# Create the current conf file |
# Create the archive of conf files |
$DIR_SCRIPTS/alcasar-conf.sh --create |
mode="update" |
fi |
234,7 → 229,14 |
fi |
exit 0 |
fi |
} # End of testing_system |
######################################################## |
## Function "testing_network" ## |
## - Test Internet access ## |
######################################################## |
testing_network() |
{ |
# Detect external/internal interfaces |
if [ -z "$EXTIF" ]; then |
EXTIF=$(/usr/sbin/ip route list | awk '/^default / {print $5}') |
413,7 → 415,7 |
exit 1 |
fi |
echo ". : ok" |
} # End of testing() |
} # End of testing_network() |
####################################################################### |
## Function "init" ## |
558,7 → 560,7 |
# Define Internet parameters |
DNS1=`cat /etc/sysconfig/network-scripts/ifcfg-$EXTIF | grep '^DNS1='| cut -d"=" -f2` # 1st DNS server |
DNS2=`cat /etc/sysconfig/network-scripts/ifcfg-$EXTIF | grep '^DNS2=' | cut -d"=" -f2` # 2nd DNS server |
DNS1=${DNS1:=208.67.220.220} |
DNS1=${DNS1:=208.67.220.220} |
DNS2=${DNS2:=208.67.222.222} |
PUBLIC_NETMASK=`/bin/ipcalc -m $PUBLIC_IP_MASK | cut -d"=" -f2` |
PUBLIC_PREFIX=`/bin/ipcalc -p $PUBLIC_IP $PUBLIC_NETMASK|cut -d"=" -f2` |
643,7 → 645,8 |
IPADDR=$PUBLIC_IP |
NETMASK=$PUBLIC_NETMASK |
GATEWAY=$PUBLIC_GATEWAY |
DNS1=127.0.0.1 |
DNS1=$DNS1 |
DNS2=$DNS2 |
RESOLV_MODS=yes |
ONBOOT=yes |
METRIC=10 |
1472,7 → 1475,7 |
# vnstat-dashboard |
$SED "s?^\$thisInterface.*?\$thisInterface = \"$EXTIF\";?" $DIR_ACC/manager/vnstat/index.php |
[ -e /lib/systemd/system/vnstat.service.default ] || cp /lib/systemd/system/vnstat.service /lib/systemd/system/vnstat.service.default |
$SED "s?^PIDFILE=.*?PIDFILE=/var/run/vnstat/vnstat.pid?g" /lib/systemd/system/vnstat.service |
$SED "s?^PIDFILE=.*?PIDFILE=/run/vnstat/vnstat.pid?g" /lib/systemd/system/vnstat.service |
} # End of vnstat() |
################################################################### |
2209,7 → 2212,6 |
ExecStart=$DIR_DEST_BIN/alcasar-load_balancing.sh start |
ExecStop=$DIR_DEST_BIN/alcasar-load_balancing.sh stop |
TimeoutSec=0 |
SysVStartPriority=99 |
[Install] |
WantedBy=multi-user.target |
2373,13 → 2375,13 |
exit 0 |
;; |
-i | --install) |
for func in license testing |
for func in license testing_system |
do |
header_install |
$func |
if [ $DEBUG_ALCASAR == "on" ] |
then |
echo "*** 'debug' : end of install '$func' ***" |
echo "*** 'debug' : end of function '$func' ***" |
read |
fi |
done |
2449,12 → 2451,12 |
fi |
mode="update" |
fi |
for func in init network CA ACC time_server init_db freeradius chilli e2guardian antivirus ulogd nfsen vnstat dnsmasq unbound dhcpd BL cron fail2ban gammu_smsd msec letsencrypt post_install |
for func in testing_network init network CA ACC time_server init_db freeradius chilli e2guardian antivirus ulogd nfsen vnstat dnsmasq unbound dhcpd BL cron fail2ban gammu_smsd msec letsencrypt post_install |
do |
$func |
if [ $DEBUG_ALCASAR == "on" ] |
then |
echo "*** 'debug' : end of install '$func' ***" |
echo "*** 'debug' : end of function '$func' ***" |
read |
fi |
done |
/readme.txt |
---|
1,10 → 1,12 |
$Id: readme-2.0.txt 581 2011-04-21 16:59:59Z richard $ |
ALCASAR-3.5 |
ALCASAR-3.5.1 |
*********** English ********** |
- New installation : Boot your system with the ISO file of Linux-Mageia-7.1 (or with "Mageiar" ISO file which is customized ISO file of Linux-Mageia (Linux Mageia + ALCASAR = Mageiar). |
--> Follow ALCASAR installation documentation. |
- Update ALCASAR 3.5 |
--> Copy, uncompress and run the installation script. It ask you if you want to update |
- Update ALCASAR 3.x |
--> On your running ALCASAR, create and retrieve the configuration file with the command "alcasar-conf.sh -create". This configuration file (alcasar-conf.tar.gz) is stored in "/var/tmp/" (or in "/tmp/"). |
--> Install the Linux-Mageia-7.1 as a new installation, but without formating the "/var" partition. Just before running the ALCASAR installation script, verify that your configuration file (alcasar-conf.tar.gz) is indeed in "/var/tmp/" folder. Copy it in this folder if necessary. |
11,6 → 13,8 |
*********** Français ******** |
- Nouvelle installation : Démarrez votre système avec l'image ISO de Linux-Mageia7.1 (ou l'image ISO de "Mageiar" qui est une image ISO personnalisée de Linux-Mageia (Linux Mageia + ALCASAR = Mageiar). |
--> Suivez la documentation d'installation d'ALCASAR. |
- Mise à jour d'une version 3.5 |
--> copiez, décompressez et lancez le script d'installation. Il vous demandera si vous voulez mettre à jour. |
- Mise à jour d'une version 3.x |
--> Sur votre ALCASAR en fonctionnement, créez et récupérez le fichier de configuration via la commande "alcasar-conf.sh -create". Ce fichier de configuration (alcasar-conf.tar.gz) est enregistré dans le répertoire "/var/tmp/' (ou "/tmp/"). |
--> Installez Linux-Mageia-7.1 comme pour une nouvelle installation, mais sans formater la partition "/var/". Juste avant de lancer le script d'installation d'alcasar, vérifiez que votre fichier de configuration (alcasar-conf.tar.gz) et bien dans le répertoire "/var/tmp". Copiez-le dans ce répertoire le cas échéant. |
/scripts/alcasar-conf.sh |
---|
113,7 → 113,7 |
MAJ_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f1` |
MIN_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f2` |
UPD_PREVIOUS_VERSION=`echo $PREVIOUS_VERSION|cut -d"." -f3|cut -c1` |
for line in `cat $DIR_UPDATE/etc/alcasar.conf | grep "=" | grep -Ev "^#| |VERSION|INSTALL_DATE|PUBLIC|GW|DNS|SMS|EXTIF|INTIF"` |
for line in `cat $DIR_UPDATE/etc/alcasar.conf | grep "=" | grep -Ev "^#| |VERSION|INSTALL_DATE|PUBLIC|GW|SMS|EXTIF|INTIF"` |
do |
key=`echo $line | cut -d"=" -f1` |
key=$key= |
287,7 → 287,7 |
cat <<EOF > /etc/sysconfig/network-scripts/ifcfg-$EXTIF |
DEVICE=$EXTIF |
BOOTPROTO=dhcp |
DNS1=$DNS1 |
DNS1=127.0.0.1 |
PEERDNS=no |
RESOLV_MODS=yes |
ONBOOT=yes |
307,7 → 307,7 |
IPADDR=$PUBLIC_IP |
NETMASK=$PUBLIC_NETMASK |
GATEWAY=$PUBLIC_GATEWAY |
DNS1=$DNS1 |
DNS1=127.0.0.1 |
RESOLV_MODS=yes |
ONBOOT=yes |
METRIC=10 |
/scripts/alcasar-uninstall.sh |
---|
292,7 → 292,7 |
echo "--------------------------------------------------------------------------" |
# unbound, iptables & sshd should stay on to allow remote update |
services="alcasar-load_balancing vnstat clamav-daemon clamav-freshclam ntpd php-fpm lighttpd radiusd mysqld unbound-blacklist unbound-whitelist dnsmasq-whitelist unbound-blackhole nfcapd fail2ban ulogd-ext-access ulogd-ssh ulogd-traceability e2guardian chilli" |
/usr/local/bin/alcasar-bypass.sh -on # to allow remote update |
/usr/local/bin/alcasar-bypass.sh -on # to allow remote update + users stay connected during the update |
fi |
echo "Stopping services : " |
/web/acc/alcasar-3.5.1-presentation-en.pdf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/web/acc/alcasar-3.5.1-presentation-fr.pdf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/web/acc/alcasar-3.5.1-technique.pdf |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |