Dont't copy cache-ispn.xml from old to new config.
This commit is contained in:
@ -614,11 +614,66 @@ 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
|
||||||
|
Reference in New Issue
Block a user