From c267953da793e3bd8d68b3a2730713d63ca3a57b Mon Sep 17 00:00:00 2001 From: P4R4NORM4L Date: Sun, 13 Sep 2020 15:50:32 -0600 Subject: [PATCH] feat(rustserver): add rust custom map support (#3017) --- lgsm/functions/command_wipe.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 66b335446..7ebf2aa9d 100644 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -77,6 +77,32 @@ fn_wipe_server_files(){ fn_sleep_time fn_script_log_pass "No barren map save to remove." fi + # Wipe custom map. + if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]; then + echo -en "removing custom map file(s)..." + fn_sleep_time + fn_script_log_info "Removing map file(s): ${serveridentitydir}/*.map" + find "${serveridentitydir:?}" -type f -name "*.map" -delete | tee -a "${lgsmlog}" + fn_wipe_exit_code + fn_sleep_time + else + echo -e "no map file to remove" + fn_sleep_time + fn_script_log_pass "No map file to remove" + fi + # Wipe custom map save. + if [ -n "$(find "${serveridentitydir}" -type f -name "*.sav")" ]; then + echo -en "removing map save *.sav file(s)..." + fn_sleep_time + fn_script_log_info "Removing map save(s): ${serveridentitydir}/*.sav" + find "${serveridentitydir:?}" -type f -name "*.sav" -delete | tee -a "${lgsmlog}" + fn_wipe_exit_code + fn_sleep_time + else + echo -e "no map save to remove" + fn_sleep_time + fn_script_log_pass "No map save to remove." + fi # Wipe user dir, might be a legacy thing, maybe to be removed. if [ -d "${serveridentitydir}/user" ]; then echo -en "removing user directory..."