chore(env): SERVER_HOSTNAMES variable

- With retro-compatibility with `SERVER_HOSTNAME`
This commit is contained in:
Quentin McGaw
2022-02-05 23:20:17 +00:00
parent 0e6db2f1c5
commit a69c456965
2 changed files with 5 additions and 2 deletions

View File

@@ -42,7 +42,10 @@ func (r *Reader) readServerSelection(vpnProvider, vpnType string) (
ss.Cities = lowerAndSplit(citiesCSV)
ss.ISPs = envToCSV("ISP")
ss.Hostnames = envToCSV("SERVER_HOSTNAME")
_, hostnamesCSV := r.getEnvWithRetro("SERVER_HOSTNAMES", "SERVER_HOSTNAME")
ss.Hostnames = lowerAndSplit(hostnamesCSV)
ss.Names = envToCSV("SERVER_NAME")
if csv := os.Getenv("SERVER_NUMBER"); csv != "" {