....
This commit is contained in:
@@ -88,7 +88,9 @@ jobs:
|
|||||||
flarectl --json dns list --zone "trez.wtf" --type=CNAME --content "trez.wtf" | jq '.[].Name' | sed -e 's|"||g' | awk -F"." '{print $1}' | sort > cloudflare_subdomains.txt
|
flarectl --json dns list --zone "trez.wtf" --type=CNAME --content "trez.wtf" | jq '.[].Name' | sed -e 's|"||g' | awk -F"." '{print $1}' | sort > cloudflare_subdomains.txt
|
||||||
echo "Grabbing subdomains from docker-compose.yml..."
|
echo "Grabbing subdomains from docker-compose.yml..."
|
||||||
yq '.services[].labels.swag_url' docker-compose.yml | egrep -v 'null' | sed -e 's|"||g' | awk -F'.' '{print $1}' | sort > compose_subdomains.txt
|
yq '.services[].labels.swag_url' docker-compose.yml | egrep -v 'null' | sed -e 's|"||g' | awk -F'.' '{print $1}' | sort > compose_subdomains.txt
|
||||||
|
which diff
|
||||||
diff compose_subdomains.txt cloudflare_subdomains.txt | egrep '<' | awk '{print $2}' > missing_subdomains.txt
|
diff compose_subdomains.txt cloudflare_subdomains.txt | egrep '<' | awk '{print $2}' > missing_subdomains.txt
|
||||||
|
cat missing_subdomains.txt
|
||||||
if [ -s missing_subdomains.txt ]; then
|
if [ -s missing_subdomains.txt ]; then
|
||||||
echo "Missing subdomains found. Creating them..."
|
echo "Missing subdomains found. Creating them..."
|
||||||
while IFS= read -r subdomain; do
|
while IFS= read -r subdomain; do
|
||||||
|
|||||||
Reference in New Issue
Block a user