26,6 → 26,7 |
MTU=`grep ^PUBLIC_MTU= $CONF_FILE|cut -d"=" -f2` |
DHCP_mode=`grep ^DHCP= $CONF_FILE|cut -d"=" -f2` |
INT_DNS_mode=`grep ^INT_DNS_ACTIVE= $CONF_FILE|cut -d"=" -f2` |
LDAP_mode=`grep ^LDAP= $CONF_FILE|cut -d"=" -f2` |
HOSTNAME=`grep ^HOSTNAME= $CONF_FILE|cut -d"=" -f2` |
DOMAIN=`grep ^DOMAIN= $CONF_FILE|cut -d"=" -f2` |
SED="/bin/sed -i" |
98,13 → 99,6 |
else |
cp -f /etc/pki/tls/certs/alcasar.crt $DIR_UPDATE/server-chain.pem |
fi |
# backup gammu conf file (if necessary) |
SMS=`grep ^SMS= $CONF_FILE|cut -d"=" -f2` |
if [ "$SMS" == "on" ] |
then |
cp -f /etc/gammurc $DIR_UPDATE |
cp -f /etc/gammu_smsd_conf $DIR_UPDATE |
fi |
# archive file creation |
cd /var/tmp || { echo "Unable to find /var/tmp directory"; } |
tar -cf alcasar-conf.tar conf/ |
125,7 → 119,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|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= |
168,8 → 162,6 |
[ -e $DIR_UPDATE/etc/hosts ] && cp -f $DIR_UPDATE/etc/hosts /etc/ # local host name resolution |
[ -e $DIR_UPDATE/etc/alcasar-letsencrypt ] && cp -f $DIR_UPDATE/etc/alcasar-letsencrypt $DIR_ETC/ # Letsencrypt local conf |
[ -d $DIR_UPDATE/etc/letsencrypt ] && cp -rf $DIR_UPDATE/etc/letsencrypt $DIR_ETC/ # Letsencrypt local conf files |
[ -e $DIR_UPDATE/gammurc ] && cp -f $DIR_UPDATE/gammurc /etc/ # Gammu conf file |
[ -e $DIR_UPDATE/gammu_smsd_conf ] && cp -f $DIR_UPDATE/gammu_smsd_conf /etc/ # Gammu_smsd conf file |
# Retrieve BL/WL custom files |
cp -f $DIR_UPDATE/custom_bl/exceptioniplist $DIR_E2G/ |
cp -f $DIR_UPDATE/custom_bl/exceptionsitelist $DIR_E2G/ |
504,25 → 496,12 |
fi |
fi |
# Start / Stop LDAP authentification |
if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage |
if [ $LDAP_mode = "on" ] || [ $LDAP_mode = "On" ] || [ $LDAP_mode = "ON" ] |
then |
LDAP_mode=`grep ^LDAP= $CONF_FILE|cut -d"=" -f2` |
if [ $LDAP_mode = "on" ] |
then |
$DIR_BIN/alcasar-ldap.sh --on |
else |
$DIR_BIN/alcasar-ldap.sh --off |
fi |
fi |
# Start / Stop Gammu-smsd (SMS) |
if [ "$PARENT_SCRIPT" != "alcasar.sh" ] # don't launch on install stage |
then |
SMS_mode=`grep ^SMS= $CONF_FILE|cut -d"=" -f2` |
if [ $SMS_mode = "on" ] |
then |
$DIR_BIN/alcasar-sms.sh --start |
fi |
fi |
echo |
;; |
*) |