From 64364dce41a48772e45349ae6a648ec5c2bd4715 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sat, 16 Jan 2021 16:32:42 +0000 Subject: [PATCH] random seed --- lgsm/functions/command_wipe.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index f48f9e5f8..5b4c90271 100755 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -198,6 +198,13 @@ fn_wipe_warning(){ fn_print_warn "wipe is about to start" } +# Will change the seed everytime the wipe command is run if the seed in config is not set +fn_wipe_random_seed(){ + if [ -z "${seed}" ]; then + shuf -i 1-2147483647 -n 1 > "${datadir}/${servername}-seed.txt" + fi +} + fn_print_dots "" check.sh @@ -219,6 +226,7 @@ if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ fi fn_print_complete_nl "Wiping ${selfname}" fn_script_log_pass "Wiping ${selfname}" + fn_wipe_random_seed else fn_print_ok_nl "Wipe not required" fn_script_log_pass "Wipe not required"