diff options
author | Simon Rettberg | 2017-05-24 22:29:20 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-05-24 22:29:20 +0200 |
commit | 8de2fd84b5828069c822c2bad9abebfb0a6590b9 (patch) | |
tree | 19b497696bfe953bca2b7e2473bcde7dba93f39c /satellit_installer | |
parent | [SSUS] Tweak execution order; install updated slxadmin cron files (diff) | |
download | setup-scripts-8de2fd84b5828069c822c2bad9abebfb0a6590b9.tar.gz setup-scripts-8de2fd84b5828069c822c2bad9abebfb0a6590b9.tar.xz setup-scripts-8de2fd84b5828069c822c2bad9abebfb0a6590b9.zip |
[SSPS] Handle 64bit systems in dmsd.sh and give more mem to java
Diffstat (limited to 'satellit_installer')
-rw-r--r-- | satellit_installer/includes/50-install_bwSuite_server.inc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/satellit_installer/includes/50-install_bwSuite_server.inc b/satellit_installer/includes/50-install_bwSuite_server.inc index f732bdd..85a8904 100644 --- a/satellit_installer/includes/50-install_bwSuite_server.inc +++ b/satellit_installer/includes/50-install_bwSuite_server.inc @@ -40,9 +40,16 @@ install_bwSuite_service() { KB=\$($(which grep) ^MemTotal /proc/meminfo | $(which awk) '{print \$2}') [ -z "\$KB" ] && KB=600000 - MB=\$(( \$KB / ( 1024 * 2 ) )) - [ "\$MB" -gt 2000 ] && MB=2000 + if [ "\$KB" -gt 4096000 ]; then + MB=\$(( \$KB / ( 1024 * 3 ) + 667 )) + else + MB=\$(( \$KB / ( 1024 * 2 ) )) + fi + if [ "\$MB" -gt 2000 ] && ! $(which java) -version 2>&1 | $(which grep) -q '64-Bit'; then + MB=2000 + fi [ "\$MB" -lt 190 ] && MB=190 + [ "\$MB" -gt 4500 ] && MB=4500 exec $(which java) -Xmx\${MB}M -jar dmsd.jar EOF |