Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-conf.sh 3247 2025-02-02 23:22:02Z rexy $
|
2 |
# $Id: alcasar-conf.sh 3254 2025-02-22 17:08:05Z 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 198... |
Line 198... |
198 |
## V3.6 --> V3.7
|
198 |
## V3.6 --> V3.7
|
199 |
## if domain name is .localdomain, change it with .lan (see RFC 6762) and adapt certificates.
|
199 |
## if domain name is .localdomain, change it with .lan (see RFC 6762) and adapt certificates.
|
200 |
DOMAIN=`grep ^DOMAIN= $CONF_FILE|cut -d"=" -f2`
|
200 |
DOMAIN=`grep ^DOMAIN= $CONF_FILE|cut -d"=" -f2`
|
201 |
if [[ $DOMAIN == "localdomain" ]] then
|
201 |
if [[ $DOMAIN == "localdomain" ]] then
|
202 |
$SED "s/^DOMAIN=.*/DOMAIN=lan/g" $CONF_FILE
|
202 |
$SED "s/^DOMAIN=.*/DOMAIN=lan/g" $CONF_FILE
|
- |
|
203 |
$SED "s/^LDAP_BASE=.*/LDAP_BASE=cn=Users;dc=serverad;dc=lan/g" $CONF_FILE
|
203 |
$DIR_BIN/alcasar-CA.sh
|
204 |
$DIR_BIN/alcasar-CA.sh
|
204 |
chown root:apache /etc/pki/CA; chmod 750 /etc/pki/CA
|
205 |
chown root:apache /etc/pki/CA; chmod 750 /etc/pki/CA
|
205 |
chown root:apache /etc/pki/CA/alcasar-ca.crt; chmod 640 /etc/pki/CA/alcasar-ca.crt
|
206 |
chown root:apache /etc/pki/CA/alcasar-ca.crt; chmod 640 /etc/pki/CA/alcasar-ca.crt
|
206 |
chown root:root /etc/pki/CA/private; chmod 700 /etc/pki/CA/private
|
207 |
chown root:root /etc/pki/CA/private; chmod 700 /etc/pki/CA/private
|
207 |
chmod 600 /etc/pki/CA/private/*
|
208 |
chmod 600 /etc/pki/CA/private/*
|