1
0
Fork 0
mirror of https://github.com/streamaserver/streama.git synced 2026-04-25 18:45:59 +03:00
Running as a service (autostart) on Ubuntu 15 or higher
Antonia Engfors edited this page 2020-04-06 22:41:37 +02:00

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].jar streama.jar

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.jar
SuccessExitStatus=143
ConditionPathExists=/data/streama/streama.jar
# end streama.service content

[Install]
WantedBy=multi-user.target

Enable and start the service

sudo systemctl enable streama.service
sudo systemctl start streama.service