Hi, i wanted to know how i can add a service to the diagnostic service list in the frontend.
I've created the rc.d script and the action config file but it won't appear.
(https://i.postimg.cc/Fsg7wM9K/Capture3.jpg)
action_node-red.conf
[start]
command:/usr/local/etc/rc.d/node-red start
parameters:
type:script
message:starting node-red
[restart]
command:/usr/local/etc/rc.d/node-red restart
parameters:
type:script
message:restarting node-red
[stop]
command:/usr/local/etc/rc.d/node-red stop
parameters:
type:script
message:stopping node-red
You need a function like that one to register it:
https://github.com/opnsense/plugins/blob/master/www/nginx/src/etc/inc/plugins.inc.d/nginx.inc#L38
Quote from: fabian on February 24, 2020, 05:32:48 PM
You need a function like that one to register it:
https://github.com/opnsense/plugins/blob/master/www/nginx/src/etc/inc/plugins.inc.d/nginx.inc#L38
Thanks a lot, i've succeded but i can't figure a way of adding the check for $config[node-red][enabled]
i've checked other rc.d files but couldn't find a way of implementing or understanding how it works.
I'm using this rc.d script to handle node-red.
https://gist.github.com/apearson/56a2cd137099dbeaf6683ef99aa43ce0
Could you please tell me how to do it?
EDIT: it appears to be related to "pluginctl -s", but there isn't any nodered service in the list.
Just return / use true instead. It is not a managed service.