Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-conf.sh 2546 2018-05-06 01:26:25Z tom.houdayer $
|
2 |
# $Id: alcasar-conf.sh 2554 2018-05-20 11:02:46Z lucas.echard $
|
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 125... |
Line 125... |
125 |
# Retrieve the security certificates (CA and server)
|
125 |
# Retrieve the security certificates (CA and server)
|
126 |
cp -f $DIR_UPDATE/alcasar-ca.crt* /etc/pki/CA/ # autosigned & official
|
126 |
cp -f $DIR_UPDATE/alcasar-ca.crt* /etc/pki/CA/ # autosigned & official
|
127 |
cp -f $DIR_UPDATE/alcasar-ca.key* /etc/pki/CA/private/ # autosigned & official
|
127 |
cp -f $DIR_UPDATE/alcasar-ca.key* /etc/pki/CA/private/ # autosigned & official
|
128 |
cp -f $DIR_UPDATE/alcasar.crt /etc/pki/tls/certs/
|
128 |
cp -f $DIR_UPDATE/alcasar.crt /etc/pki/tls/certs/
|
129 |
cp -f $DIR_UPDATE/alcasar.key /etc/pki/tls/private/
|
129 |
cp -f $DIR_UPDATE/alcasar.key /etc/pki/tls/private/
|
- |
|
130 |
|
130 |
cat /etc/pki/tls/private/alcasar.key /etc/pki/tls/certs/alcasar.crt > /etc/pki/tls/private/alcasar.pem
|
131 |
(cat /etc/pki/tls/private/alcasar.key; echo; cat /etc/pki/tls/certs/alcasar.crt) > /etc/pki/tls/private/alcasar.pem
|
- |
|
132 |
|
131 |
[ -e $DIR_UPDATE/server-chain.crt ] && cp -f $DIR_UPDATE/server-chain.crt* /etc/pki/tls/certs/ # autosigned and official if exist
|
133 |
[ -e $DIR_UPDATE/server-chain.crt ] && cp -f $DIR_UPDATE/server-chain.crt* /etc/pki/tls/certs/ # autosigned and official if exist
|
132 |
chown -R root:apache /etc/pki
|
134 |
chown -R root:apache /etc/pki
|
133 |
chmod -R 750 /etc/pki
|
135 |
chmod -R 750 /etc/pki
|
134 |
# Import of the users database
|
136 |
# Import of the users database
|
135 |
gzip -dc < `ls $DIR_UPDATE/alcasar-users-database*` | mysql -u$DB_USER -p$DB_PASS
|
137 |
gzip -dc < `ls $DIR_UPDATE/alcasar-users-database*` | mysql -u$DB_USER -p$DB_PASS
|