Page 1 of 1

No2: Correct way of running UMS as daemon?

Posted: Wed Oct 16, 2019 11:47 pm
by hornetster
No2 - because it has been asked before, but a long time ago....

Have setup UMS, originally being run as me, on Ubuntu 18.04.3LTS x64 8GB, and run from the GUI, was able to set it up, it accessed the media, and all was good. But.....
The PC I am running it on, is basically headless(?), but does run a GUI, and I have access via Teamviewer, but generally connect using ssh, so I wish to configure UMS to run on startup, via systemd.
Have created a ums user, and set them as owner of the ums directory (setup under /opt/ums/)
Have created /etc/systemd/system/ums.service, containing:

Code: Select all

[Unit]
Description=Universal Media Server
After=syslog.target network.target rpcbind.service

[Service]
User=ums
Group=users
ExecStart=/opt/ums/UMS.sh

[Install]
WantedBy=multi-user.target
Seems to be running, but is limping... Webpage is accessible, but no data (when originally run as user, data was present and accessible.)
Would guess that it is either a config issue (Have added my media directory to UMS.conf), or a permissions issue?

Re: No2: Correct way of running UMS as daemon?

Posted: Thu Oct 17, 2019 5:00 pm
by atamariya
UMS.conf is usually created in $HOME/.config directory. When you're running it as a daemon, you should configure the one in Root's home directory.

Re: No2: Correct way of running UMS as daemon?

Posted: Thu Oct 17, 2019 11:02 pm
by hornetster
Slight update on this... (Think I am correct....)
When starting as "ums" the user, the config is in /home/ums, and need to update any relevant info in this (shared folders and folders to scan, etc)
Believe I now have it working, using basically the above startup file etc.
Not real pretty and need to sort out other options, but so far, so good....