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

40 lines
1.2 KiB
Desktop File

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