Skip to content

Instantly share code, notes, and snippets.

@codepope
Created August 24, 2020 12:07
Show Gist options
  • Save codepope/76fcc0ced574dbe2e225cb99624f2c0f to your computer and use it in GitHub Desktop.
Save codepope/76fcc0ced574dbe2e225cb99624f2c0f to your computer and use it in GitHub Desktop.
Finds a Fly app name in the local directory's fly.toml and destroys without mercy
#!/bin/bash
regex='^app = "([^"]*)"'
while read line
do
if [[ $line =~ $regex ]]
then
appname="${BASH_REMATCH[1]}"
flyctl destroy $appname -y
exit
fi
done < fly.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment