CLI command to ignore a specific service being down?

Hi there,
I want to turn off yunohost-api service as recommended in the security hardening section of the Yuno docs.

The trouble is that I get daily emails about yunohost-api being disabled. I want to still get an email if there’s another issue, but would just like to ignore these services being down. I managed to ignore other turned-off services from the web-ui. I can’t do this with yunohost-api obviously the web UI doesn’t work when it’s down! :crazy_face:

So what CLI command can I enter to get diagnosis to ignore yunohost-api being turned off?

I’m guessing it’s something along the lines of yunohost diagnosis ignore services yunohost-api?

Sure thing, yunohost --help can give you more information on the proper syntax.

yunohost diagnosis ignore [--filter filter] [--list]
Configure some diagnosis results to be ignored and therefore not considered as actual issues

?

1 Like

OK, I figured it out. The command needed is:

sudo yunohost diagnosis ignore --filter services service=yunohost-api

Now to see if I can figure out how to add this to the documentation wiki security page, where it suggests turning off yunohost-api to harden Yunohost…

EDIT: OMG… I just found that someone else already added this exact command to the wiki and I didn’t notice. :person_facepalming:

All the yunohost commands in a pdf format

(cf thread How to Manage YunoHost from CommandLine? - #4 by tinder )