소스 검색

prevent last update check running if lock file last update lock missing

Daniel Gibbs 6 년 전
부모
커밋
8034566617
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      lgsm/functions/check_last_update.sh

+ 6 - 4
lgsm/functions/check_last_update.sh

@@ -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