Running as a service (autostart) on Ubuntu 15 or higher

Jeremy Ryan edited this page Dec 11, 2017 · 1 revision

Go to the app directory, for example

cd /data/streama

Create link a link to your installed version

This is useful when you update streama you can just update the link:

ln -s streama-[version].war streama.war

Create the systemctl service

nano /etc/systemd/system/streama.service

In this file add the below, if your streama isn't in /data/streama change them.

[Unit]
Description=streama
After=syslog.target

[Service]
User=[USER TO RUN APP]
ExecStart=/data/streama/streama.war
SuccessExitStatus=143
ConditionPathExists=/data/streama/streama.war
# end streama.service content

[Install]
WantedBy=multi-user.target

Enable and start the service

sudo systemctl enable streama.service
sudo systemctl start streama.service
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.