[Unit] Description=NTVMR - Collaborative Research Environment After=syslog.target network.target collatex-ws.service [Service] User=ntvmr Group=ntvmr WorkingDirectory=/home/ntvmr/liferay Type=forking ExecStart=/home/ntvmr/liferay/tomcat/bin/startup.sh ExecStop=/home/ntvmr/liferay/tomcat/bin/shutdown.sh Environment="JAVA_HOME=/opt/java/" Environment="JAVA_OPTS=-Djava.security.egd=file:///dev/urandom" # Specifies the maximum file descriptor number that can be opened by this process LimitNOFILE=infinity # 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 # Shutdown delay in seconds, before process is tried to be killed with KILL (if configured) TimeoutStopSec=20 OOMScoreAdjust=-800 Restart=always RestartSec=20 Nice=-19 UMask=0002 [Install] WantedBy=multi-user.target