35,6 → 35,7 |
hostnamectl set-hostname alcasar.localdomain |
$SED "s/^\tAuthName.*/\tAuthName alcasar.localdomain/g" /etc/httpd/conf/webapps.d/alcasar.conf |
$SED "s/^\tErrorDocument.*/\tErrorDocument 404 https:\/\/alcasar.localdomain\//g" /etc/httpd/conf/webapps.d/alcasar.conf |
$SED "s/:.*:/:alcasar.localdomain:/g" /usr/local/etc/digest/key_* |
} |
|
function defaultCert() |
44,8 → 45,8 |
if [ -f $DIR_CERT/certs/server-chain.crt.old ] |
then |
mv $DIR_CERT/certs/server-chain.crt.old $DIR_CERT/certs/server-chain.crt |
else |
rm -f $DIR_CERT/certs/server-chain.crt |
#else |
# rm -f $DIR_CERT/certs/server-chain.crt |
fi |
} |
|
73,6 → 74,7 |
hostnamectl set-hostname $fqdn |
$SED "s/^\tAuthName.*/\tAuthName $fqdn/g" /etc/httpd/conf/webapps.d/alcasar.conf |
$SED "s/^\tErrorDocument.*/\tErrorDocument 404 https:\/\/$fqdn\//g" /etc/httpd/conf/webapps.d/alcasar.conf |
$SED "s/:.*:/:$fqdn:/g" /usr/local/etc/digest/key_* |
fi |
} |
|
91,6 → 93,8 |
cp $cert $DIR_CERT/certs/alcasar.crt |
cp $key $DIR_CERT/private/alcasar.key |
|
rm $cert $key |
|
chown root:apache $DIR_CERT/certs/alcasar.crt |
chown root:apache $DIR_CERT/private/alcasar.key |
|
105,6 → 109,7 |
mv $DIR_CERT/certs/server-chain.crt $DIR_CERT/certs/server-chain.crt.old |
fi |
cp $sc $DIR_CERT/certs/server-chain.crt |
rm $sc |
chown root:apache $DIR_CERT/certs/server-chain.crt |
chmod 750 $DIR_CERT/certs/server-chain.crt |
fi |