Include sleep in bash script

Script now waits 2 Minutes before the next request
This commit is contained in:
Neshura 2022-11-27 16:49:00 +01:00
parent e860641b79
commit 1fec94e049
No known key found for this signature in database
GPG key ID: ACDF5B6EBECF6B0A

View file

@ -1,7 +1,10 @@
#!/bin/bash #!/bin/bash
cd /home/server/DNS_Temp cd "/usr/bin/app" || exit
while :
do
ipv4=$(curl -k -s https://am.i.mullvad.net/ip) ipv4=$(curl -k -s https://am.i.mullvad.net/ip)
ipv6=$(curl -k -s https://ipv6.am.i.mullvad.net/) ipv6=$(curl -k -s https://ipv6.am.i.mullvad.net/)
source venv/bin/activate
python3 ./cloudflare_script.py 4 "$ipv4" python3 ./cloudflare_script.py 4 "$ipv4"
python3 ./cloudflare_script.py 6 "$ipv6" python3 ./cloudflare_script.py 6 "$ipv6"
sleep 120
done