需編輯的路徑
/etc/systemd/system/*.service
範例檔
[Unit]
Description=xwiki
[Service]
#Type=simple
WorkingDirectory=/home/zon/jetty/
ExecStart=/bin/java -jar start.jar
#User=zon
Type=simple
#Restart=always
#ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartSec=15s
[Install]
WantedBy=multi-user.target
# 載入
sudo systemctl daemon-reload
sudo systemctl start xwiki.service
sudo systemctl enable xwiki.service