Ignore yunohost-api error when not running (#2167)

* Ignore yunohost-api error when not running

Add instruction to ignore the error about yunohost-api not running
when it is intentionally stopped and disabled.

* Update pages/02.administer/45.tutorials/60.security/security.md

Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>

* Update pages/02.administer/45.tutorials/60.security/security.md

Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>

Co-authored-by: Éric Gaspar <46165813+ericgaspar@users.noreply.github.com>
This commit is contained in:
Nicolas Palix 2022-12-20 19:01:14 +01:00 committed by GitHub
parent 8e9a97d30a
commit d4b1cfe31c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,7 +94,7 @@ sudo yunohost settings set security.ssh.compatibility -v modern
YunoHost administration is accessible through an **HTTP API**, served on the 6787 port by default (only on `localhost`). YunoHost administration is accessible through an **HTTP API**, served on the 6787 port by default (only on `localhost`).
It can be used to administer a lot of things on your server, so malicious actors can also use it to damage your server. It can be used to administer a lot of things on your server, so malicious actors can also use it to damage your server.
The best thing to do, if you know how to use the [command-line interface](/commandline), is to deactivate the `yunohost-api` service. The best thing to do, if you know how to use the [command-line interface (CLI)](/commandline), is to deactivate the `yunohost-api` service.
! This will completely disable both YunoHost's API and the web administration panel that relies on it. ! This will completely disable both YunoHost's API and the web administration panel that relies on it.
! Proceed only if you are comfortable with the command line interface. ! Proceed only if you are comfortable with the command line interface.
@ -103,3 +103,10 @@ The best thing to do, if you know how to use the [command-line interface](/comma
sudo systemctl disable yunohost-api sudo systemctl disable yunohost-api
sudo systemctl stop yunohost-api sudo systemctl stop yunohost-api
``` ```
As `yunohost-api` is now disabled and not running, Diagnosis will report an error and cannot be ignored from the API.
If you want to ignore this error, you can configure YunoHost from the CLI.
```bash
sudo yunohost diagnosis ignore --filter services service=yunohost-api
```