16 lines
557 B
SYSTEMD
16 lines
557 B
SYSTEMD
|
[Unit]
|
||
|
Description=Apache Tomcat
|
||
|
Documentation=https://tomcat.apache.org
|
||
|
After=network-online.target firewalld.service
|
||
|
Wants=network-online.target
|
||
|
|
||
|
[Service]
|
||
|
Type=forking
|
||
|
ExecStart=/opt/tomcat/apache-tomcat-9.0.89/bin/startup.sh
|
||
|
ExecReload=/opt/tomcat/apache-tomcat-9.0.89/bin/shutdown.sh & kill -9 $(ps aux | grep /opt/toomcat/apache-tomcat-9.0.89 | grep -v grep | awk '{print $2}' | tr -d ' ') & /opt/tomcat/apache-tomcat-9.0.89/bin/startup.sh
|
||
|
ExecStop=/opt/tomcat/apache-tomcat-9.0.89/bin/shutdown.sh
|
||
|
Restart=always
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|