From ccd6ea69fe0d609376251624d22e26be217b3a53 Mon Sep 17 00:00:00 2001 From: Viktor Berke Date: Sat, 2 Feb 2019 15:53:19 +0100 Subject: [PATCH] Save defaults upon reset Refs #31 --- share/killinuxfloor | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/share/killinuxfloor b/share/killinuxfloor index c9b09b4..307634a 100755 --- a/share/killinuxfloor +++ b/share/killinuxfloor @@ -344,6 +344,7 @@ function reset_kf2 () # nuke old config rm -f ${LIVE_CONF}/KF*.ini rm -f ${LIVE_CONF}/LinuxServer-*.ini + rm -rf ${LIVE_CONF}/Defaults # nuke cache if [ -d ${CACHE_DIR} ] && [ ! -z "$(ls -A ${CACHE_DIR})" ] @@ -390,6 +391,12 @@ function reset_kf2 () mv -f ${OWN_CONF}/My-Startup.conf.tmp ${OWN_CONF}/My-Startup.conf sudo /bin/systemctl daemon-reload + mkdir -p ${LIVE_CONF}/Defaults + cp -f "${LIVE_CONF}/KFWeb.ini" "${LIVE_CONF}/Defaults" + cp -f "${LIVE_CONF}/KFWebAdmin.ini" "${LIVE_CONF}/Defaults" + cp -f "${LIVE_CONF}/LinuxServer-KFEngine.ini" "${LIVE_CONF}/Defaults" + cp -f "${LIVE_CONF}/LinuxServer-KFGame.ini" "${LIVE_CONF}/Defaults" + ${ECHO_DONE} echo -e "\e[32mKilling Floor 2 has been reset successfully!\e[0m"