mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-11-15 13:24:08 +01:00
Add Shebang for tools Script
This commit is contained in:
@@ -1,18 +1,18 @@
|
|||||||
#/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
repo_url="https://github.com/go-acme/lego"
|
repo_url="https://github.com/go-acme/lego"
|
||||||
|
|
||||||
# Check if the folder "./lego" exists
|
# Check if the folder "./lego" exists
|
||||||
if [ -d "./lego" ]; then
|
if [ -d "./lego" ]; then
|
||||||
# If the folder exists, change into it and perform a git pull
|
# If the folder exists, change into it and perform a git pull
|
||||||
echo "Folder './lego' exists. Pulling updates..."
|
echo "Folder './lego' exists. Pulling updates..."
|
||||||
cd "./lego" || exit
|
cd "./lego" || exit
|
||||||
git pull
|
git pull
|
||||||
cd ../
|
cd ../
|
||||||
else
|
else
|
||||||
# If the folder doesn't exist, clone the repository
|
# If the folder doesn't exist, clone the repository
|
||||||
echo "Folder './lego' does not exist. Cloning the repository..."
|
echo "Folder './lego' does not exist. Cloning the repository..."
|
||||||
git clone "$repo_url" "./lego" || exit
|
git clone "$repo_url" "./lego" || exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run the extract.go to get all the config from lego source code
|
# Run the extract.go to get all the config from lego source code
|
||||||
@@ -26,3 +26,4 @@ sleep 2
|
|||||||
# This is to help go compiler to not load all the lego source file when compile
|
# This is to help go compiler to not load all the lego source file when compile
|
||||||
#rm -rf ./lego/
|
#rm -rf ./lego/
|
||||||
echo "Config generated"
|
echo "Config generated"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# /bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Build the acmedns
|
# Build the acmedns
|
||||||
echo "Building ACMEDNS"
|
echo "Building ACMEDNS"
|
||||||
@@ -8,3 +8,4 @@ cd ../../../
|
|||||||
|
|
||||||
cp ./tools/dns_challenge_update/code-gen/acmedns/acmedns.go ./src/mod/acme/acmedns/acmedns.go
|
cp ./tools/dns_challenge_update/code-gen/acmedns/acmedns.go ./src/mod/acme/acmedns/acmedns.go
|
||||||
cp ./tools/dns_challenge_update/code-gen/acmedns/providers.json ./src/mod/acme/acmedns/providers.json
|
cp ./tools/dns_challenge_update/code-gen/acmedns/providers.json ./src/mod/acme/acmedns/providers.json
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
cd ../src/mod/geodb
|
cd ../src/mod/geodb
|
||||||
|
|
||||||
@@ -11,24 +11,25 @@ echo "Updating geodb csv files"
|
|||||||
echo "Downloading IPv4 database"
|
echo "Downloading IPv4 database"
|
||||||
curl -f https://cdn.jsdelivr.net/npm/@ip-location-db/geo-whois-asn-country/geo-whois-asn-country-ipv4.csv -o geoipv4.csv
|
curl -f https://cdn.jsdelivr.net/npm/@ip-location-db/geo-whois-asn-country/geo-whois-asn-country-ipv4.csv -o geoipv4.csv
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to download IPv4 database"
|
echo "Failed to download IPv4 database"
|
||||||
failed=true
|
failed=true
|
||||||
else
|
else
|
||||||
echo "Successfully downloaded IPv4 database"
|
echo "Successfully downloaded IPv4 database"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Downloading IPv6 database"
|
echo "Downloading IPv6 database"
|
||||||
curl -f https://cdn.jsdelivr.net/npm/@ip-location-db/geo-whois-asn-country/geo-whois-asn-country-ipv6.csv -o geoipv6.csv
|
curl -f https://cdn.jsdelivr.net/npm/@ip-location-db/geo-whois-asn-country/geo-whois-asn-country-ipv6.csv -o geoipv6.csv
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "Failed to download IPv6 database"
|
echo "Failed to download IPv6 database"
|
||||||
failed=true
|
failed=true
|
||||||
else
|
else
|
||||||
echo "Successfully downloaded IPv6 database"
|
echo "Successfully downloaded IPv6 database"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$failed" = true ]; then
|
if [ "$failed" = true ]; then
|
||||||
echo "One or more downloads failed. Blocking exit..."
|
echo "One or more downloads failed. Blocking exit..."
|
||||||
while :; do
|
while :; do
|
||||||
read -p "Press [Ctrl+C] to exit..." input
|
read -p "Press [Ctrl+C] to exit..." input
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user