xWiki Systemd service

Sep 19, 2018

xwiki.service

[Unit]
Description=xWiki
After=network.target

[Service]
Type=simple
User=xwiki
EnvironmentFile=/opt/xwiki-latest/xwiki_env
WorkingDirectory=/opt/xwiki-latest/
ExecStart=/bin/bash start_xwiki.sh
ExecStop=/bin/bash stop_xwiki.sh
Restart=always
# Restart service after 10 seconds if node service crashes
RestartSec=10
# Output to syslog
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=xwiki


[Install]
WantedBy=multi-user.target

xwiki_env:

JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre
PATH=$JAVA_HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/puppetlabs/bin:/snap/bin
Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.