Dont't copy cache-ispn.xml from old to new config.

This commit is contained in:
2025-08-13 01:42:21 +02:00
parent fbc8e87d92
commit bd8b63b1d2

View File

@ -614,14 +614,69 @@ fi
blank_line blank_line
echononl "Copy new keycloak.conf keycloak.conf.ORIG"
if [[ -f "${KEYCLOAK_INSTALL_DIR}/conf/keycloak.conf" ]] ; then
cp -a "${KEYCLOAK_INSTALL_DIR}/conf/keycloak.conf" \
"${KEYCLOAK_INSTALL_DIR}/conf/keycloak.conf.ORIG" > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then
echo_failed
error "$(cat "$log_file")"
if $terminal ; then
echononl "\033[1mcontinue anyway\033[m [yes/no]: "
read OK
while [[ "${OK,,}" != "yes" ]] && [[ "${OK,,}" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
fi
else
echo_ok
fi
else
echo_skipped
fi
echononl "Copy 'conf/ directory from the previous installation to the new installation." echononl "Copy 'conf/ directory from the previous installation to the new installation."
cp -a "${CUR_INSTALL_DIR}.${backup_date}/conf" "${KEYCLOAK_INSTALL_DIR}/" > "$log_file" 2>&1
#cp -a "${CUR_INSTALL_DIR}.${backup_date}/conf" "${KEYCLOAK_INSTALL_DIR}/" > "$log_file" 2>&1
# shopt -s extglob
# cp -r ${CUR_INSTALL_DIR}.${backup_date}/conf/!('cache-ispn.xml'|'README.md') \
# ${KEYCLOAK_INSTALL_DIR}/conf/ > "$log_file" 2>&1
# shopt -u extglob
find "${CUR_INSTALL_DIR}.${backup_date}/conf" -type f \
! -name 'cache-ispn.xml' \
! -name 'README.md' \
! -name 'keycloak.conf.ORIG' \
-exec cp --parents {} "${KEYCLOAK_INSTALL_DIR}/conf" \; > "$log_file" 2>&1
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
echo_failed echo_failed
error "$(cat "$log_file")" error "$(cat "$log_file")"
if $terminal ; then
echononl "\033[1mcontinue anyway\033[m [yes/no]: "
read OK
while [[ "${OK,,}" != "yes" ]] && [[ "${OK,,}" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
fi
else else
echo_ok echo_ok
fi fi
echononl "Copy 'providers/ directory from the previous installation to the new installation." echononl "Copy 'providers/ directory from the previous installation to the new installation."
cp -a "${CUR_INSTALL_DIR}.${backup_date}/providers" "${KEYCLOAK_INSTALL_DIR}/" > "$log_file" 2>&1 cp -a "${CUR_INSTALL_DIR}.${backup_date}/providers" "${KEYCLOAK_INSTALL_DIR}/" > "$log_file" 2>&1
@ -630,7 +685,7 @@ if [[ $? -ne 0 ]]; then
error "$(cat "$log_file")" error "$(cat "$log_file")"
else else
echo_ok echo_ok
fi fi
echononl "Copy 'themes/ directory from the previous installation to the new installation." echononl "Copy 'themes/ directory from the previous installation to the new installation."
cp -a "${CUR_INSTALL_DIR}.${backup_date}/themes" "${KEYCLOAK_INSTALL_DIR}/" > "$log_file" 2>&1 cp -a "${CUR_INSTALL_DIR}.${backup_date}/themes" "${KEYCLOAK_INSTALL_DIR}/" > "$log_file" 2>&1
@ -639,7 +694,7 @@ if [[ $? -ne 0 ]]; then
error "$(cat "$log_file")" error "$(cat "$log_file")"
else else
echo_ok echo_ok
fi fi
echononl "Set ownbership of installation directory '${KEYCLOAK_INSTALL_DIR}'.." echononl "Set ownbership of installation directory '${KEYCLOAK_INSTALL_DIR}'.."
@ -667,7 +722,7 @@ if [[ $? -ne 0 ]]; then
error "$(cat "$log_file")" error "$(cat "$log_file")"
else else
echo_ok echo_ok
fi fi
_certs_installed=false _certs_installed=false