Skip to content

Commit

Permalink
prevent last update check running if lock file last update lock missing
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Apr 11, 2020
1 parent 773812a commit 8034566
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lgsm/functions/check_last_update.sh
Expand Up @@ -12,8 +12,10 @@ if [ -f "${lockdir}/lastupdate.lock" ]; then
lastupdate=$(cat "${lockdir}/lastupdate.lock")
fi

if [ ! -f "${lockdir}/${selfname}-laststart.lock" ]||[ "${laststart}" -lt "${lastupdate}" ]; then
fn_print_info "${selfname} has not been restarted since last update"
fn_script_log_info "${selfname} has not been restarted since last update"
command_restart.sh
if [ -f "${lockdir}/lastupdate.lock" ]; then
if [ ! -f "${lockdir}/${selfname}-laststart.lock" ]||[ "${laststart}" -lt "${lastupdate}" ]; then
fn_print_info "${selfname} has not been restarted since last update"
fn_script_log_info "${selfname} has not been restarted since last update"
command_restart.sh
fi
fi

0 comments on commit 8034566

Please sign in to comment.