Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-conf.sh 2570 2018-07-16 22:22:12Z rexy $
|
2 |
# $Id: alcasar-conf.sh 2571 2018-07-17 16:11:51Z rexy $
|
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 148... |
Line 148... |
148 |
127.0.0.1 localhost
|
148 |
127.0.0.1 localhost
|
149 |
$PRIVATE_IP $HOSTNAME
|
149 |
$PRIVATE_IP $HOSTNAME
|
150 |
EOF
|
150 |
EOF
|
151 |
## apache & dansguardian are replaced with lighttpd & EĀ²guardian
|
151 |
## apache & dansguardian are replaced with lighttpd & EĀ²guardian
|
152 |
rm_rpm="apache apache-mod_php apache-mod_ssl dansguardian"
|
152 |
rm_rpm="apache apache-mod_php apache-mod_ssl dansguardian"
|
153 |
/usr/sbin/urpme --auto -a $rm_rpm
|
153 |
/usr/sbin/urpme --auto -a $rm_rpm 2>/dev/null
|
154 |
/usr/sbin/urpme --auto --auto-orphans
|
154 |
/usr/sbin/urpme --auto --auto-orphans
|
155 |
rm -rf /etc/httpd/ /var/log/httpd/ /var/dansguardian/ /etc/dansguardian/
|
155 |
rm -rf /etc/httpd/ /var/log/httpd/ /var/dansguardian/ /etc/dansguardian/
|
156 |
## lighttpd need a .pem certificate (aggregation with private key & server crt)
|
156 |
## lighttpd need a .pem certificate (aggregation with private key & server crt)
|
157 |
(cat $DIR_UPDATE/alcasar-ca.key; echo; cat $DIR_UPDATE/alcasar.crt) > $DIR_UPDATE/alcasar.pem
|
157 |
(cat $DIR_UPDATE/alcasar.key; echo; cat $DIR_UPDATE/alcasar.crt) > $DIR_UPDATE/alcasar.pem
|
158 |
fi
|
158 |
fi
|
159 |
###################### End of modifications between versions #######################
|
159 |
###################### End of modifications between versions #######################
|
160 |
# Retrieve the logo
|
160 |
# Retrieve the logo
|
161 |
[ -e $DIR_UPDATE/organisme.png ] && cp -f $DIR_UPDATE/organisme.png $DIR_WEB/images/
|
161 |
[ -e $DIR_UPDATE/organisme.png ] && cp -f $DIR_UPDATE/organisme.png $DIR_WEB/images/
|
162 |
chown apache:apache $DIR_WEB/images/organisme.png $DIR_WEB/intercept.php
|
162 |
chown apache:apache $DIR_WEB/images/organisme.png $DIR_WEB/intercept.php
|
163 |
# Retrieve the security certificates (CA and server)
|
163 |
# Retrieve the security certificates (CA and server)
|
164 |
cp -f $DIR_UPDATE/alcasar-ca.crt* /etc/pki/CA/
|
164 |
cp -f $DIR_UPDATE/alcasar-ca.crt /etc/pki/CA/
|
165 |
cp -f $DIR_UPDATE/alcasar-ca.key* /etc/pki/CA/private/
|
165 |
cp -f $DIR_UPDATE/alcasar-ca.key /etc/pki/CA/private/
|
166 |
cp -f $DIR_UPDATE/alcasar.crt /etc/pki/tls/certs/
|
166 |
cp -f $DIR_UPDATE/alcasar.crt /etc/pki/tls/certs/
|
167 |
cp -f $DIR_UPDATE/alcasar.key /etc/pki/tls/private/
|
167 |
cp -f $DIR_UPDATE/alcasar.key /etc/pki/tls/private/
|
168 |
cp -f $DIR_UPDATE/alcasar.pem /etc/pki/tls/private/
|
168 |
cp -f $DIR_UPDATE/alcasar.pem /etc/pki/tls/private/
|
169 |
[ -e $DIR_UPDATE/server-chain.crt ] && cp -f $DIR_UPDATE/server-chain.crt* /etc/pki/tls/certs/ # autosigned and official if exist
|
169 |
[ -e $DIR_UPDATE/server-chain.crt ] && cp -f $DIR_UPDATE/server-chain.crt* /etc/pki/tls/certs/ # autosigned and official if exist
|
170 |
chown -R root:apache /etc/pki
|
170 |
chown -R root:apache /etc/pki
|