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
bb7905ae
Commit
bb7905ae
authored
Jun 03, 2014
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
on second and later runs of start.sh, recall the inputs the user entered the last time
parent
24edd5ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
start.sh
setup/start.sh
+26
-3
No files found.
setup/start.sh
View file @
bb7905ae
...
...
@@ -13,6 +13,11 @@ if [ "`lsb_release -d | sed 's/.*:\s*//'`" != "Ubuntu 14.04 LTS" ]; then
exit
fi
# Recall the last settings used if we're running this a second time.
if
[
-f
/etc/mailinabox.conf
]
;
then
cat
/etc/mailinabox.conf |
sed
s/^/DEFAULT_/
>
/tmp/mailinabox.prev.conf
source
/tmp/mailinabox.prev.conf
fi
# Gather information from the user about the hostname and public IP
# address of this host.
...
...
@@ -23,7 +28,13 @@ if [ -z "$PUBLIC_HOSTNAME" ]; then
echo
"Josh uses box.occams.info as his hostname. Yours should"
echo
"be similar."
echo
read
-e
-i
"
`
hostname
`
"
-p
"Hostname: "
PUBLIC_HOSTNAME
if
[
-z
"
$DEFAULT_PUBLIC_HOSTNAME
"
]
;
then
# set a default on first run
DEFAULT_PUBLIC_HOSTNAME
=
`
hostname
`
fi
read
-e
-i
"
$DEFAULT_PUBLIC_HOSTNAME
"
-p
"Hostname: "
PUBLIC_HOSTNAME
fi
if
[
-z
"
$PUBLIC_IP
"
]
;
then
...
...
@@ -32,7 +43,13 @@ if [ -z "$PUBLIC_IP" ]; then
echo
"you by your ISP. We've guessed a value, but just backspace"
echo
"it if it's wrong."
echo
read
-e
-i
"
`
hostname
-i
`
"
-p
"Public IP: "
PUBLIC_IP
if
[
-z
"
$DEFAULT_PUBLIC_IP
"
]
;
then
# set a default on first run
DEFAULT_PUBLIC_IP
=
`
hostname
-i
`
fi
read
-e
-i
"
$DEFAULT_PUBLIC_IP
"
-p
"Public IP: "
PUBLIC_IP
fi
if
[
-z
"
$CSR_COUNTRY
"
]
;
then
...
...
@@ -41,7 +58,13 @@ if [ -z "$CSR_COUNTRY" ]; then
echo
"live or where your organization is based. (This is used to"
echo
"create an SSL certificate.)"
echo
read
-e
-p
"Country Code: "
CSR_COUNTRY
#if [ -z "$DEFAULT_CSR_COUNTRY" ]; then
# # set a default on first run
# DEFAULT_CSR_COUNTRY=...?
#fi
read
-e
-i
"
$DEFAULT_CSR_COUNTRY
"
-p
"Country Code: "
CSR_COUNTRY
fi
# Create the user named "user-data" and store all persistent user
...
...
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