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

41 lines
1.1 KiB
SYSTEMD
Raw Normal View History

2021-03-21 05:17:45 +01:00
[Unit]
Description=Apache Tomcat 9 Web Application Server
After=network.target
2023-05-29 17:10:43 +02:00
RequiresMountsFor=/var/log/__APP__/tomcat __INSTALL_DIR__/var/lib/tomcat9
2021-03-21 05:17:45 +01:00
[Service]
# Configuration
Environment="CATALINA_HOME=/usr/share/tomcat9"
2023-05-29 17:10:43 +02:00
Environment="CATALINA_BASE=__INSTALL_DIR__/var/lib/tomcat9"
2021-03-21 05:17:45 +01:00
Environment="CATALINA_TMPDIR=/tmp"
Environment="JAVA_OPTS=-Djava.awt.headless=true"
2023-05-29 17:10:43 +02:00
Environment="GUACAMOLE_HOME=__INSTALL_DIR__/etc/guacamole"
2021-03-21 05:17:45 +01:00
# 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
2023-05-29 17:10:43 +02:00
ReadWritePaths=__INSTALL_DIR__/etc/tomcat9/Catalina/
ReadWritePaths=__INSTALL_DIR__/var/lib/tomcat9/webapps/
2021-03-21 05:17:45 +01:00
ReadWritePaths=/var/log/__APP__/tomcat/
[Install]
WantedBy=multi-user.target