From faaa4e1769b0ad864990e7437e323abeec361094 Mon Sep 17 00:00:00 2001 From: "DaNuk (DNk)" Date: Mon, 15 May 2023 09:52:16 +0300 Subject: [PATCH] Update shm_actions_script.sh --- shm_actions_script.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/shm_actions_script.sh b/shm_actions_script.sh index 59582c7..a8d15e1 100755 --- a/shm_actions_script.sh +++ b/shm_actions_script.sh @@ -24,15 +24,7 @@ case $EVENT in echo "ERROR: set variable 'host_name' to server settings" exit 1 fi - - echo "Check domain: $API_URL" - HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" $API_URL/shm/v1/test) - if [ $HTTP_CODE -ne '200' ]; then - echo "ERROR: incorrect API URL: $API_URL" - echo "Got status: $HTTP_CODE" - exit 1 - fi - + echo "Install required packages" apt update apt install -y \ @@ -41,7 +33,16 @@ case $EVENT in wireguard \ wireguard-tools \ qrencode \ + curl \ wget + + echo "Check domain: $API_URL" + HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" $API_URL/shm/v1/test) + if [ $HTTP_CODE -ne '200' ]; then + echo "ERROR: incorrect API URL: $API_URL" + echo "Got status: $HTTP_CODE" + exit 1 + fi if [[ $CURL_REPO && ! -f $CURL ]]; then echo "Install modern curl"