We run sec as a non-root user. However the rc.d script does not provide a way to change the pid file. I can think of several ways to solve this:
- Change pidfile to /var/run/sec/sec.pid
Optionally chown /var/run/sec to sec_user
- Optionally add sec_pidfile to rc.conf to override pidfile
If the maintainer could provide feedback on the preferred solution I'm happy to create a patch for approval.
I think the best would be to go to first solution, you can consider it approved.
Created attachment 192516 [details]
It's better for me if you'd approve the patch.
Comment on attachment 192516 [details]
A commit references this bug:
Date: Sat Apr 14 21:15:24 UTC 2018
New revision: 467341
Move the pidfile from /var/run/sec.pid to /var/run/sec/sec.pid
and chown /var/run/sec when sec_user is set.
Reviewed by: ler (mentor)
Approved by: email@example.com, ler (mentor)
Differential Revision: https://reviews.freebsd.org/D15068