cp-tls-inspection-applicati.../gen-update-script.sh

13 lines
563 B
Bash
Raw Normal View History

2021-07-14 15:11:52 +03:00
#!/usr/bin/env bash
SCRIPT_MD5_SUM=$(md5sum cron-example-with-diff-dstdom.sh|awk '{print $1}')
SCRIPT_URL="https://raw.githubusercontent.com/elico/cp-tls-inspection-application-update-cron/master/cron-example-with-diff-dstdom.sh"
2021-07-14 16:17:50 +03:00
DST_DOMAIN_LIST_URL=$(head -1 dst-domain-url)
2021-07-14 15:11:52 +03:00
APP_NAME="NgTechBypassDstDomain"
SCRIPT_PATH="/storage/cron-example-with-diff-dstdom.sh"
2021-07-14 16:19:20 +03:00
echo -e "#!/usr/bin/env bash\n\nwget ${SCRIPT_URL} \\
2021-07-14 15:11:52 +03:00
-O ${SCRIPT_PATH} && \\
md5sum ${SCRIPT_PATH} | grep \"^${SCRIPT_MD5_SUM} \" && \\
bash ${SCRIPT_PATH} ${APP_NAME} ${DST_DOMAIN_LIST_URL}"