Skip to content

Commit

Permalink
Save defaults upon reset
Browse files Browse the repository at this point in the history
Refs #31
  • Loading branch information
bviktor committed Feb 2, 2019
1 parent f918f48 commit ccd6ea6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions share/killinuxfloor
Original file line number Diff line number Diff line change
Expand Up @@ -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})" ]
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit ccd6ea6

Please sign in to comment.