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
fd622618
Commit
fd622618
authored
Oct 15, 2016
by
Michael Kroes
Committed by
Joshua Tauberer
Oct 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lower memory requirements to 512MB, display a warning if system memory is below 768MB. (#952)
parent
bbe27df4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
CHANGELOG.md
CHANGELOG.md
+4
-0
preflight.sh
setup/preflight.sh
+10
-4
No files found.
CHANGELOG.md
View file @
fd622618
...
@@ -10,6 +10,10 @@ Control panel:
...
@@ -10,6 +10,10 @@ Control panel:
*
Status checks failed if the system doesn't support iptables
*
Status checks failed if the system doesn't support iptables
*
Add support for SSHFP records when sshd listens on non-standard ports
*
Add support for SSHFP records when sshd listens on non-standard ports
System:
*
Lower memory requirements to 512MB, display a warning if system memory is below 768MB.
v0.20 (September 23, 2016)
v0.20 (September 23, 2016)
--------------------------
--------------------------
...
...
setup/preflight.sh
View file @
fd622618
...
@@ -19,20 +19,26 @@ fi
...
@@ -19,20 +19,26 @@ fi
# Check that we have enough memory.
# Check that we have enough memory.
#
#
# /proc/meminfo reports free memory in kibibytes. Our baseline will be 768 MB,
# /proc/meminfo reports free memory in kibibytes. Our baseline will be 512 MB,
# which is 750000 kibibytes.
# which is 500000 kibibytes.
#
# We will display a warning if the memory is below 768 MB which is 750000 kibibytes
#
#
# Skip the check if we appear to be running inside of Vagrant, because that's really just for testing.
# Skip the check if we appear to be running inside of Vagrant, because that's really just for testing.
TOTAL_PHYSICAL_MEM
=
$(
head
-n
1 /proc/meminfo |
awk
'{print $2}'
)
TOTAL_PHYSICAL_MEM
=
$(
head
-n
1 /proc/meminfo |
awk
'{print $2}'
)
if
[
$TOTAL_PHYSICAL_MEM
-lt
75
0000
]
;
then
if
[
$TOTAL_PHYSICAL_MEM
-lt
50
0000
]
;
then
if
[
!
-d
/vagrant
]
;
then
if
[
!
-d
/vagrant
]
;
then
TOTAL_PHYSICAL_MEM
=
$(
expr
\(
\(
$TOTAL_PHYSICAL_MEM
\*
1024
\)
/ 1000
\)
/ 1000
)
TOTAL_PHYSICAL_MEM
=
$(
expr
\(
\(
$TOTAL_PHYSICAL_MEM
\*
1024
\)
/ 1000
\)
/ 1000
)
echo
"Your Mail-in-a-Box needs more memory (RAM) to function properly."
echo
"Your Mail-in-a-Box needs more memory (RAM) to function properly."
echo
"Please provision a machine with at least
768
MB, 1 GB recommended."
echo
"Please provision a machine with at least
512
MB, 1 GB recommended."
echo
"This machine has
$TOTAL_PHYSICAL_MEM
MB memory."
echo
"This machine has
$TOTAL_PHYSICAL_MEM
MB memory."
exit
exit
fi
fi
fi
fi
if
[
$TOTAL_PHYSICAL_MEM
-lt
750000
]
;
then
echo
"WARNING: Your Mail-in-a-Box has less than 768 MB of memory."
echo
" It might run unreliably when under heavy load."
fi
# Check that tempfs is mounted with exec
# Check that tempfs is mounted with exec
MOUNTED_TMP_AS_NO_EXEC
=
$(
grep
"/tmp.*noexec"
/proc/mounts
)
MOUNTED_TMP_AS_NO_EXEC
=
$(
grep
"/tmp.*noexec"
/proc/mounts
)
...
...
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