Subversion Repositories ALCASAR

Rev

Rev 2430 | Rev 2474 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2430 Rev 2432
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-conf.sh 2430 2017-10-18 22:24:25Z tom.houdayer $
2
# $Id: alcasar-conf.sh 2432 2017-10-22 20:56:33Z richard $
3
 
3
 
4
# alcasar-conf.sh
4
# alcasar-conf.sh
5
# by REXY
5
# by REXY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
 
7
 
Line 106... Line 106...
106
                if [ -e /etc/pki/tls/certs/server-chain.crt ]; then
106
                if [ -e /etc/pki/tls/certs/server-chain.crt ]; then
107
                        cp -f /etc/pki/tls/certs/server-chain.crt* $DIR_UPDATE # autosigned and official if exist
107
                        cp -f /etc/pki/tls/certs/server-chain.crt* $DIR_UPDATE # autosigned and official if exist
108
                else
108
                else
109
                        cp -f /etc/pki/tls/certs/alcasar.crt $DIR_UPDATE/server-chain.crt
109
                        cp -f /etc/pki/tls/certs/alcasar.crt $DIR_UPDATE/server-chain.crt
110
                fi
110
                fi
111
# backup DNSMASQ conf file
-
 
112
                cp /etc/sysconfig/dnsmasq $DIR_UPDATE
-
 
113
# archive file creation
111
# archive file creation
114
                cd /tmp
112
                cd /tmp
115
                tar -cf alcasar-conf.tar conf/
113
                tar -cf alcasar-conf.tar conf/
116
                gzip -f alcasar-conf.tar
114
                gzip -f alcasar-conf.tar
117
                rm -rf $DIR_UPDATE
115
                rm -rf $DIR_UPDATE
Line 147... Line 145...
147
# Adapt DNS/URL filtering
145
# Adapt DNS/URL filtering
148
                PARENT_SCRIPT=`basename $0`
146
                PARENT_SCRIPT=`basename $0`
149
                export PARENT_SCRIPT
147
                export PARENT_SCRIPT
150
                $DIR_BIN/alcasar-bl.sh -cat_choice
148
                $DIR_BIN/alcasar-bl.sh -cat_choice
151
                $DIR_BIN/alcasar-bl.sh -reload
149
                $DIR_BIN/alcasar-bl.sh -reload
152
# retrieve dnsmasq general config file
-
 
153
                [ -e $DIR_UPDATE/dnsmasq ] && cp -f $DIR_UPDATE/dnsmasq /etc/sysconfig/dnsmasq \
-
 
154
                && chown root.root /etc/sysconfig/dnsmasq \
-
 
155
                && chmod 644 /etc/sysconfig/dnsmasq
-
 
156
# admin profile update (admin + manager + backup)
150
# admin profile update (admin + manager + backup)
157
                $DIR_BIN/alcasar-profil.sh --list
151
                $DIR_BIN/alcasar-profil.sh --list
158
# Start / Stop SSH Daemon
152
# Start / Stop SSH Daemon
159
                ssh_active=`grep "^SSH=" $CONF_FILE|cut -d"=" -f2`
153
                ssh_active=`grep "^SSH=" $CONF_FILE|cut -d"=" -f2`
160
                if [ $ssh_active = "on" ]
154
                if [ $ssh_active = "on" ]