diff --git a/management/status_checks.py b/management/status_checks.py index 6dcd0214..c4441bbc 100755 --- a/management/status_checks.py +++ b/management/status_checks.py @@ -740,10 +740,10 @@ def what_version_is_this(env): return tag def get_latest_miab_version(): - # This pings https://mailinabox.email/bootstrap.sh and extracts the tag named in + # This pings https://mailinabox.email/setup.sh and extracts the tag named in # the script to determine the current product version. import urllib.request - return re.search(b'TAG=(.*)', urllib.request.urlopen("https://mailinabox.email/bootstrap.sh?ping=1").read()).group(1).decode("utf8") + return re.search(b'TAG=(.*)', urllib.request.urlopen("https://mailinabox.email/setup.sh?ping=1").read()).group(1).decode("utf8") def check_miab_version(env, output): config = load_settings(env) diff --git a/setup/bootstrap.sh b/setup/bootstrap.sh index e2bb2006..b5a55d32 100644 --- a/setup/bootstrap.sh +++ b/setup/bootstrap.sh @@ -2,7 +2,7 @@ ######################################################### # This script is intended to be run like this: # -# curl https://.../bootstrap.sh | sudo bash +# curl https://mailinabox.email/setup.sh | sudo bash # ######################################################### diff --git a/tools/parse-nginx-log-bootstrap-accesses.py b/tools/parse-nginx-log-bootstrap-accesses.py index 7ab56b02..b08bc253 100755 --- a/tools/parse-nginx-log-bootstrap-accesses.py +++ b/tools/parse-nginx-log-bootstrap-accesses.py @@ -2,7 +2,8 @@ # # This is a tool Josh uses on his box serving mailinabox.email to parse the nginx # access log to see how many people are installing Mail-in-a-Box each day, by -# looking at accesses to the bootstrap.sh script. +# looking at accesses to the bootstrap.sh script (which is currently at the URL +# .../setup.sh). import re, glob, gzip, os.path, json import dateutil.parser @@ -24,9 +25,10 @@ for fn in glob.glob("/var/log/nginx/access.log*"): # Loop through the lines in the access log. with f: for line in f: - # Find lines that are GETs on /bootstrap.sh by either curl or wget. + # Find lines that are GETs on the bootstrap script by either curl or wget. # (Note that we purposely skip ...?ping=1 requests which is the admin panel querying us for updates.) - m = re.match(rb"(?P\S+) - - \[(?P.*?)\] \"GET /bootstrap.sh HTTP/.*\" 200 \d+ .* \"(?:curl|wget)", line, re.I) + # (Also, the URL changed in January 2016, but we'll accept both.) + m = re.match(rb"(?P\S+) - - \[(?P.*?)\] \"GET /(bootstrap.sh|setup.sh) HTTP/.*\" 200 \d+ .* \"(?:curl|wget)", line, re.I) if m: date, time = m.group("date").decode("ascii").split(":", 1) date = dateutil.parser.parse(date).date().isoformat()