This commit is contained in:
Eliezer Croitoru 2021-07-18 12:41:50 +03:00
parent 4fecbecee4
commit f8f0035228

3
gen-userscipt.sh Normal file → Executable file
View File

@ -3,12 +3,13 @@
SCRIPT_MD5_SUM=$( md5sum collect-clish-scripts-daemon.sh |awk '{print $1}' ) 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_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" SCRIPT_PATH="/storage/collect-clish-scripts-daemon.sh"
USERSCRIPT_PATH="/pfrm2.0/etc/userScript"
echo -e "#!/usr/bin/env bash echo -e "#!/usr/bin/env bash
logger \"Starting /pfrm2.0/etc/userScript\" logger \"Starting /pfrm2.0/etc/userScript\"
wget ${SCRIPT_URL} \\ wget ${SCRIPT_URL} \\
-O ${SCRIPT_PATH} && \\ -O ${SCRIPT_PATH} && \\
md5sum ${SCRIPT_PATH} | grep \"^${SCRIPT_MD5_SUM} \" && \\ md5sum ${SCRIPT_PATH} | grep \"^${SCRIPT_MD5_SUM} \" >/dev/null && \\
bash ${SCRIPT_PATH} & bash ${SCRIPT_PATH} &
logger \"Exiting /pfrm2.0/etc/userScript\"" logger \"Exiting /pfrm2.0/etc/userScript\""