From 79f6e3a443ac9e432923dd8a1974c7262fb0904a Mon Sep 17 00:00:00 2001 From: Eliezer Croitoru Date: Sun, 18 Jul 2021 12:43:46 +0300 Subject: [PATCH] 21 --- gen-userscipt.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gen-userscipt.sh b/gen-userscipt.sh index dbb7c5a..2f231b8 100755 --- a/gen-userscipt.sh +++ b/gen-userscipt.sh @@ -4,10 +4,14 @@ SCRIPT_MD5_SUM=$( md5sum collect-clish-scripts-daemon.sh |awk '{print $1}' ) SCRIPT_URL="https://raw.githubusercontent.com/elico/cp-tls-inspection-application-update-cron/master/collect-clish-scripts-daemon.sh" SCRIPT_PATH="/storage/collect-clish-scripts-daemon.sh" USERSCRIPT_PATH="/pfrm2.0/etc/userScript" +LOCK_FILE="/tmp/clish-scripts-collector-cron-lockfile" echo -e "#!/usr/bin/env bash logger \"Starting /pfrm2.0/etc/userScript\" + +rm -f -v "${LOCK_FILE}" + wget ${SCRIPT_URL} \\ -O ${SCRIPT_PATH} && \\ md5sum ${SCRIPT_PATH} | grep \"^${SCRIPT_MD5_SUM} \" >/dev/null && \\