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
01636c2e
Commit
01636c2e
authored
Feb 03, 2015
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'h8h-master'
I squashed some commits together and modified the commit message...
parents
20d20df8
005315cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
start.sh
setup/start.sh
+19
-3
No files found.
setup/start.sh
View file @
01636c2e
...
...
@@ -87,17 +87,33 @@ if [ -z "$SKIP_NETWORK_CHECKS" ]; then
.
setup/network-checks.sh
fi
# For the first time (if the config file (/etc/mailinabox.conf) not exists):
# Create the user named "user-data" and store all persistent user
# data (mailboxes, etc.) in that user's home directory.
#
# If the config file exists:
# Apply the existing configuration options for STORAGE_USER/ROOT
if
[
-z
"
$STORAGE_USER
"
]
;
then
STORAGE_USER
=
$(
[[
-z
"
$DEFAULT_STORAGE_USER
"
]]
&&
echo
"user-data"
||
echo
"
$DEFAULT_STORAGE_USER
"
)
fi
if
[
-z
"
$STORAGE_ROOT
"
]
;
then
STORAGE_USER
=
user-data
if
[
!
-d
/home/
$STORAGE_USER
]
;
then
useradd
-m
$STORAGE_USER
;
fi
STORAGE_ROOT
=
/home/
$STORAGE_USER
STORAGE_ROOT
=
$(
[[
-z
"
$DEFAULT_STORAGE_ROOT
"
]]
&&
echo
"/home/
$STORAGE_USER
"
||
echo
"
$DEFAULT_STORAGE_ROOT
"
)
fi
# Create the STORAGE_USER if it not exists
if
!
id
-u
$STORAGE_USER
>
/dev/null 2>&1
;
then
useradd
-m
$STORAGE_USER
fi
# Create the STORAGE_ROOT if it not exists
if
[
!
-d
$STORAGE_ROOT
]
;
then
mkdir
-p
$STORAGE_ROOT
echo
$(
setup/migrate.py
--current
)
>
$STORAGE_ROOT
/mailinabox.version
chown
$STORAGE_USER
.
$STORAGE_USER
$STORAGE_ROOT
/mailinabox.version
fi
# Save the global options in /etc/mailinabox.conf so that standalone
# tools know where to look for data.
cat
>
/etc/mailinabox.conf
<<
EOF
;
...
...
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