james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [2/2] james-project git commit: JAMES-2269 use java 8 binary in systemd unit file
Date Tue, 02 Jan 2018 10:10:54 GMT
JAMES-2269 use java 8 binary in systemd unit file


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/77125c1f
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/77125c1f
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/77125c1f

Branch: refs/heads/master
Commit: 77125c1feda39064967f674198d560e0177e1708
Parents: 9c1c6fc
Author: Matthieu Baechler <matthieu@apache.org>
Authored: Fri Dec 22 09:54:34 2017 +0100
Committer: benwa <btellier@linagora.com>
Committed: Tue Jan 2 17:10:05 2018 +0700

----------------------------------------------------------------------
 dockerfiles/packaging/james.service      |  2 +-
 dockerfiles/packaging/james.service.rhel | 34 +++++++++++++++++++++++++++
 dockerfiles/packaging/package.sh         |  2 +-
 3 files changed, 36 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/77125c1f/dockerfiles/packaging/james.service
----------------------------------------------------------------------
diff --git a/dockerfiles/packaging/james.service b/dockerfiles/packaging/james.service
index 1d91477..2c55df6 100644
--- a/dockerfiles/packaging/james.service
+++ b/dockerfiles/packaging/james.service
@@ -11,7 +11,7 @@ Environment=XMX=1024m
 User=root
 Group=root
 
-ExecStart=/usr/bin/java -Dworking.directory=${WORKING_DIRECTORY} -Xmx${XMX} -Dlogback.configurationFile=/etc/james/logback.xml
-jar /usr/share/james/james-server.jar 
+ExecStart=/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Dworking.directory=${WORKING_DIRECTORY}
-Xmx${XMX} -Dlogback.configurationFile=/etc/james/logback.xml -jar /usr/share/james/james-server.jar

 
 StandardOutput=journal
 StandardError=inherit

http://git-wip-us.apache.org/repos/asf/james-project/blob/77125c1f/dockerfiles/packaging/james.service.rhel
----------------------------------------------------------------------
diff --git a/dockerfiles/packaging/james.service.rhel b/dockerfiles/packaging/james.service.rhel
new file mode 100644
index 0000000..af48a62
--- /dev/null
+++ b/dockerfiles/packaging/james.service.rhel
@@ -0,0 +1,34 @@
+[Unit]
+Description=James stands for Java Apache Mail Enterprise Server! It has a modular architecture
based on a rich set of modern and efficient components which provides at the end complete,
stable, secure and extendable Mail Servers running on the JVM.
+Documentation=http://james.apache.org
+Wants=network-online.target cassandra.service elasticsearch.service
+After=network-online.target cassandra.service elasticsearch.service
+
+[Service]
+Environment=WORKING_DIRECTORY=/var/lib/james
+Environment=XMX=1024m
+
+User=root
+Group=root
+
+ExecStart=/usr/lib/jvm/jre-1.8.0-openjdk/bin/java -Dworking.directory=${WORKING_DIRECTORY}
-Xmx${XMX} -Dlogback.configurationFile=/etc/james/logback.xml -jar /usr/share/james/james-server.jar

+
+StandardOutput=journal
+StandardError=inherit
+
+# Specifies the maximum number of bytes of memory that may be locked into RAM
+# Set to "infinity" if you use the 'bootstrap.mlockall: true' option
+# in elasticsearch.yml and 'MAX_LOCKED_MEMORY=unlimited' in /etc/default/elasticsearch
+#LimitMEMLOCK=infinity
+
+# SIGTERM signal is used to stop the Java process
+KillSignal=SIGTERM
+
+# Java process is never killed
+SendSIGKILL=no
+
+# When a JVM receives a SIGTERM signal it exits with code 143
+SuccessExitStatus=143
+
+[Install]
+WantedBy=multi-user.target

http://git-wip-us.apache.org/repos/asf/james-project/blob/77125c1f/dockerfiles/packaging/package.sh
----------------------------------------------------------------------
diff --git a/dockerfiles/packaging/package.sh b/dockerfiles/packaging/package.sh
index fa5a281..ce89168 100755
--- a/dockerfiles/packaging/package.sh
+++ b/dockerfiles/packaging/package.sh
@@ -35,7 +35,7 @@ fpm -s dir -t deb \
  .
 
 #Workaround waiting for https://github.com/jordansissel/fpm/issues/1163 to be released
-cp james.service package/usr/share/james
+cp james.service.rhel package/usr/share/james/james.service
 
 fpm -s dir -t rpm \
  -n james \


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message