Browse Source

feat: add update lock file

Add functionality to create an update lock file when validating and updating SteamCMD. This prevents potential conflicts with customised files.

- Create a lock file with the current timestamp in the "command_validate.sh" script
- Create a lock file with the current timestamp in the "update_steamcmd.sh" script
pull/4296/head
Daniel Gibbs 2 years ago
parent
commit
e4571d58b1
  1. 2
      lgsm/modules/command_validate.sh
  2. 1
      lgsm/modules/update_steamcmd.sh

2
lgsm/modules/command_validate.sh

@ -23,7 +23,7 @@ fn_validate() {
fi
done
fn_print_warn_nl "Validate might overwrite some customised files"
date '+%s' > "${lockdir:?}/update.lock"
fn_dl_steamcmd
}

1
lgsm/modules/update_steamcmd.sh

@ -23,6 +23,7 @@ if [ "${forceupdate}" == "1" ]; then
exitbypass=1
command_stop.sh
fn_firstcommand_reset
date '+%s' > "${lockdir:?}/update.lock"
fn_dl_steamcmd
date +%s > "${lockdir}/last-updated.lock"
exitbypass=1

Loading…
Cancel
Save