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
e4a4b47f
Commit
e4a4b47f
authored
Dec 26, 2015
by
Joshua Tauberer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup now asks for and sets the system timezone
closes #294 see #328 maybe related to #235
parent
dbf47291
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
0 deletions
+35
-0
CHANGELOG.md
CHANGELOG.md
+1
-0
start.sh
setup/start.sh
+2
-0
system.sh
setup/system.sh
+32
-0
No files found.
CHANGELOG.md
View file @
e4a4b47f
...
@@ -19,6 +19,7 @@ Control panel:
...
@@ -19,6 +19,7 @@ Control panel:
System:
System:
*
Setup (first run only) now asks for your timezone to set the system time.
*
The Exchange/ActiveSync server is now taken offline during nightly backups (along with SMTP and IMAP).
*
The Exchange/ActiveSync server is now taken offline during nightly backups (along with SMTP and IMAP).
*
The machine's random number generator (/dev/urandom) is now seeded with Ubuntu Pollinate and a blocking read on /dev/random.
*
The machine's random number generator (/dev/urandom) is now seeded with Ubuntu Pollinate and a blocking read on /dev/random.
*
DNSSEC key generation during install now uses /dev/urandom (instead of /dev/random), which is faster.
*
DNSSEC key generation during install now uses /dev/urandom (instead of /dev/random), which is faster.
...
...
setup/start.sh
View file @
e4a4b47f
...
@@ -34,6 +34,8 @@ if [ -f /etc/mailinabox.conf ]; then
...
@@ -34,6 +34,8 @@ if [ -f /etc/mailinabox.conf ]; then
cat
/etc/mailinabox.conf |
sed
s/^/DEFAULT_/
>
/tmp/mailinabox.prev.conf
cat
/etc/mailinabox.conf |
sed
s/^/DEFAULT_/
>
/tmp/mailinabox.prev.conf
source
/tmp/mailinabox.prev.conf
source
/tmp/mailinabox.prev.conf
rm
-f
/tmp/mailinabox.prev.conf
rm
-f
/tmp/mailinabox.prev.conf
else
FIRST_TIME_SETUP
=
1
fi
fi
# Put a start script in a global location. We tell the user to run 'mailinabox'
# Put a start script in a global location. We tell the user to run 'mailinabox'
...
...
setup/system.sh
View file @
e4a4b47f
...
@@ -55,6 +55,38 @@ apt_install python3 python3-dev python3-pip \
...
@@ -55,6 +55,38 @@ apt_install python3 python3-dev python3-pip \
haveged pollinate
\
haveged pollinate
\
unattended-upgrades cron ntp fail2ban
unattended-upgrades cron ntp fail2ban
# ### Set the system timezone
#
# Some systems are missing /etc/timezone, which we cat into the configs for
# Z-Push and ownCloud, so we need to set it to something. Daily cron tasks
# like the system backup are run at a time tied to the system timezone, so
# letting the user choose will help us identify the right time to do those
# things (i.e. late at night in whatever timezone the user actually lives
# in).
#
# However, changing the timezone once it is set seems to confuse fail2ban
# and requires restarting fail2ban (done below in the fail2ban
# section) and syslog (see #328). There might be other issues, and it's
# not likely the user will want to change this, so we only ask on first
# setup.
if
[
-z
"
$NONINTERACTIVE
"
]
;
then
if
[
!
-f
/etc/timezone
]
||
[
!
-z
$FIRST_TIME_SETUP
]
;
then
# If the file is missing or this is the user's first time running
# Mail-in-a-Box setup, run the interactive timezone configuration
# tool.
dpkg-reconfigure tzdata
restart_service rsyslog
fi
else
# This is a non-interactive setup so we can't ask the user.
# If /etc/timezone is missing, set it to UTC.
if
[
!
-f
/etc/timezone
]
;
then
echo
"Setting timezone to UTC."
echo
"Etc/UTC"
>
/etc/timezone
restart_service rsyslog
fi
fi
# ### Seed /dev/urandom
# ### Seed /dev/urandom
#
#
# /dev/urandom is used by various components for generating random bytes for
# /dev/urandom is used by various components for generating random bytes for
...
...
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