1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/guacamole_ynh.git synced 2024-09-03 19:16:03 +02:00
guacamole_ynh/conf/tomcat.service
2021-03-21 19:49:14 -04:00

40 lines
1.1 KiB
Desktop File

[Unit]
Description=Apache Tomcat 9 Web Application Server
After=network.target
RequiresMountsFor=/var/log/__APP__/tomcat __FINALPATH__/var/lib/tomcat9
[Service]
# Configuration
Environment="CATALINA_HOME=/usr/share/tomcat9"
Environment="CATALINA_BASE=__FINALPATH__/var/lib/tomcat9"
Environment="CATALINA_TMPDIR=/tmp"
Environment="JAVA_OPTS=-Djava.awt.headless=true"
Environment="GUACAMOLE_HOME=__FINALPATH__/etc/guacamole"
# Lifecycle
Type=simple
ExecStartPre=+/usr/libexec/tomcat9/tomcat-update-policy.sh
ExecStart=/bin/sh /usr/libexec/tomcat9/tomcat-start.sh > /var/log/__APP__/tomcat/tomcat.log 2>&1
SuccessExitStatus=143
Restart=on-abort
# Logging
SyslogIdentifier=__APP__-tomcat9
# Security
User=__APP__-tomcat
Group=__APP__-tomcat
PrivateTmp=yes
AmbientCapabilities=CAP_NET_BIND_SERVICE
NoNewPrivileges=true
CacheDirectory=__APP__-tomcat9
CacheDirectoryMode=750
ProtectSystem=strict
ReadWritePaths=__FINALPATH__/etc/tomcat9/Catalina/
ReadWritePaths=__FINALPATH__/var/lib/tomcat9/webapps/
ReadWritePaths=/var/log/__APP__/tomcat/
[Install]
WantedBy=multi-user.target