Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
83ffc99b
Commit
83ffc99b
authored
Jan 30, 2016
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change the public URL of bootstrap.sh to setup.sh
parent
3615772b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
6 deletions
+8
-6
status_checks.py
management/status_checks.py
+2
-2
bootstrap.sh
setup/bootstrap.sh
+1
-1
parse-nginx-log-bootstrap-accesses.py
tools/parse-nginx-log-bootstrap-accesses.py
+5
-3
No files found.
management/status_checks.py
View file @
83ffc99b
...
...
@@ -740,10 +740,10 @@ def what_version_is_this(env):
return
tag
def
get_latest_miab_version
():
# This pings https://mailinabox.email/
bootstra
p.sh and extracts the tag named in
# This pings https://mailinabox.email/
setu
p.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/
bootstra
p.sh?ping=1"
)
.
read
())
.
group
(
1
)
.
decode
(
"utf8"
)
return
re
.
search
(
b
'TAG=(.*)'
,
urllib
.
request
.
urlopen
(
"https://mailinabox.email/
setu
p.sh?ping=1"
)
.
read
())
.
group
(
1
)
.
decode
(
"utf8"
)
def
check_miab_version
(
env
,
output
):
config
=
load_settings
(
env
)
...
...
setup/bootstrap.sh
View file @
83ffc99b
...
...
@@ -2,7 +2,7 @@
#########################################################
# This script is intended to be run like this:
#
# curl https://
.../bootstra
p.sh | sudo bash
# curl https://
mailinabox.email/setu
p.sh | sudo bash
#
#########################################################
...
...
tools/parse-nginx-log-bootstrap-accesses.py
View file @
83ffc99b
...
...
@@ -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<ip>
\
S+) - -
\
[(?P<date>.*?)
\
]
\"
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<ip>
\
S+) - -
\
[(?P<date>.*?)
\
]
\"
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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment