fixed: when adding a cert remove previous cert before copying the new one
This fixes when a user (or plugin) has replaced the cert with a symlink; else the symlinked file would be overwritten. This mainly is in the case of a global-cert (plugin) wildcard cert
This commit is contained in:
1 parent
57b317b0a4
commit
607b11ab6b
1 file changed
+1
@@ -71,6 +71,7 @@ cmd-certs-set() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$APP_SSL_PATH"
|
mkdir -p "$APP_SSL_PATH"
|
||||||
|
rm -f "$APP_SSL_PATH/server.crt" "$APP_SSL_PATH/server.key"
|
||||||
cp "$CRT_FILE" "$APP_SSL_PATH/server.crt"
|
cp "$CRT_FILE" "$APP_SSL_PATH/server.crt"
|
||||||
cp "$KEY_FILE" "$APP_SSL_PATH/server.key"
|
cp "$KEY_FILE" "$APP_SSL_PATH/server.key"
|
||||||
chmod 750 "$APP_SSL_PATH"
|
chmod 750 "$APP_SSL_PATH"
|
||||||
|
|||||||
Reference in new issue
Block a user