Compare commits
2 Commits
c1300f968d
...
4f80ad381a
Author | SHA1 | Date | |
---|---|---|---|
4f80ad381a | |||
16051c01c2 |
14
2021-11-09-wireguard-config-renamer/run.sh
Normal file
14
2021-11-09-wireguard-config-renamer/run.sh
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
SERVERS="$(curl -sS https://api.mullvad.net/www/relays/all/ |
|
||||||
|
jq -jr '.[] | .hostname, ",", .city_code, ",", .type, ",", .provider, "\n"' |
|
||||||
|
grep wireguard)"
|
||||||
|
|
||||||
|
for LINE in $SERVERS ; do
|
||||||
|
hostname="$(echo $LINE | awk -F, '{print $1}')"
|
||||||
|
city="$(echo $LINE | awk -F, '{print $2}')"
|
||||||
|
provider="$(echo $LINE | awk -F, '{print $4}')"
|
||||||
|
short="$(echo $hostname | awk -F'-' '{print $1}')"
|
||||||
|
echo mv mullvad-$short.conf $short-$city-$provider.conf
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user