FreeBSD service startup script


I’d been using an old version (git based, can’t remember which version sorry) and had no issues with how FreeBSD started sickrage - but I kept having issues where sometimes the whole daemon would hang, so I pulled and switched to master branch to get latest. When it starts up now it does some extra pip bootstrapping and tries to install a list of modules. For whatever reason this goes in a loop - the init script (daemon launcher) starts sickrage, which spawns pip installs, which must be failing as sickrage then exits, and the daemon relaunches it, pip install, fails, restarts, and so on.

However when I run it manually (as the unprivileged user I run it as) I can see the pip installs work and sickrage launches happily, but if I then go back to the service based startup (which should be running it as same user, same params etc) it still fails.

Only thing I can think of is the service script/daemon tool is not behaving 100% like a normal user, but I’m not too familiar with python3 on freebsd to know what to look for as to why it may be failing (e.g. path problem etc). Nothing is in the logs either to help pinpoint the issue.

Anyone got any ideas? Thanks!

Heh after a few more hours of debugging I found the issue - I don’t know why as I don’t know the FreeBSD daemon command too well, but it wasn’t setting $HOME for the user it runs the program as, so when pip was trying to install it was installing (due to --user local install) into /.local (which a normal user doesn’t have write access to, that would typically be $HOME/.local). After adding an export for HOME for my user into the rc script it worked fine.

1 Like

I’ll need to create a testing environment for FBSD and update the scripts it would seem, thanks for finding the solution to this.

Hi @Poki, could you post your startup script. I managed to get it to run manually but not as a service. I can’t seem to get it to manually start now in iocage when I follow this guide:

I got it working manually in thebrig on a xigmanas machine last night, but I wanted to install it on my freebsd 12.2 Stable release as I need to do a system update on the xigmanas box.