How to register a pkg in menu of services?

Started by vivekmauli14, December 10, 2024, 07:38:11 AM

Previous topic - Next topic
Hi,

I have created a custom FreeBSD package that functions as a regular FreeBSD service. I can start and stop it using the standard FreeBSD service commands (e.g., service <myservice> start).

However, after installing the package, I couldn't find my service listed in the /ui/core/services menu. I'd like to know how to properly register this service so it appears in the services menu and can be controlled via the UI.

After some investigation, I found the /usr/local/etc/inc/<service-name.inc> file, where I added a PHP script similar to how other services like nginx are configured. Despite this, I'm still unable to start, stop, or restart my service from the UI.

Is there a guide or checklist available for this process? Any help or pointers would be greatly appreciated.

Thanks in advance!

Best,
VivekSP


Quote from: vivekmauli14 on December 10, 2024, 07:38:11 AM
Is there a guide or checklist available for this process?

I followed these instructions:
https://blog.ohmykreee.top/article/setup-tun2socks-in-opnsense/

You can also look at files from other services, as an additional example. As strange as it may be, there are some differences in writing even from official doc.