Update shm_actions_script.sh

This commit is contained in:
DaNuk (DNk) 2023-05-15 09:52:16 +03:00 committed by GitHub
parent d341994c5e
commit faaa4e1769
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,14 +25,6 @@ case $EVENT in
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,8 +33,17 @@ 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"
mkdir -p /opt/curl