Hullo, after having read through various materials, I feel as though I am stuck.
My current attempt is listed below.
pacman -Ss <programme>
Here I create a system user which the service should run under. Sometimes installing a programme would create a user.
sudo useradd -m --home /opt/<programme> --system --user-group <programmeUser>
The run script, after creating the directory, is
sudo mkdir /etc/runit/sv/<programmeService>
sudo nvim /etc/runit/sv/<programmeService>/run
#!/bin/sh -e
exec 2>&1
exec chpst -u<programmeUser> /usr/bin/<programme>
sudo chmod 755 /etc/runit/sv/<programme>/run
Then, of course, enabling it
sudo ln -s /etc/runit/sv/<programmeService> /run/runit/service/
This service always returns status down. I have logged into the user as "sudo su <programmeUser>" as a test and launched "/usr/bin/<programme>", which launches without fault.
Furthermore, adding "runsvdir" to the exec line before the programme directory allows for the service to be up, but non responsive for some reason (should launch a webui via localhost:port).
I have successfully created a service with such a run script, however in that case the user was created with the installation of the programme (with the executable located in /opt and not /bin). As a result, I am unsure of why that one works and this does not.
The <programme> is "qbittorrent-nox", in case that is necessary information.
Any assistance is appreciated.
*minor command correction.