MichaIng / DietPi-Docs

Source repository for the DietPi OS documentation
https://dietpi.com/docs/
Creative Commons Attribution Share Alike 4.0 International
154 stars 52 forks source link

Fix the command to change the Adguard Home password #975

Closed TheFrenchGhosty closed 5 months ago

TheFrenchGhosty commented 5 months ago

This PR fixes the command used to change the Adguard Home password.

It used to add 2 spaces before the line started which make it invalid, this PR just make it use 4 spaces.

MichaIng commented 5 months ago

You are right. The config we use uses 2 spaces: https://github.com/MichaIng/DietPi/blob/master/.conf/dps_126/AdGuardHome.yaml But the syntax is rewritten to indent list elements with 2 more spaces, so that directory entries of a list are indented by 4 spaces.

Hmm, we should adjust the syntax our config as well, but need to do this shortly before release, otherwise we break AdGuard Home installs, as dietpi-software downloads this file and then adds the password key with 2 spaces only 🤔.

TheFrenchGhosty commented 5 months ago

@MichaIng

You are right. The config we use uses 2 spaces: https://github.com/MichaIng/DietPi/blob/master/.conf/dps_126/AdGuardHome.yaml

My config uses 4 spaces:

users:
  - name: admin
    password: <REDACTED>

Is that what you mean with " But the syntax is rewritten to indent list elements with 2 more spaces, so that directory entries of a list are indented by 4 spaces."

MichaIng commented 5 months ago

Yes, obviosuly, AdGuard Home parses the config file then write it back, recreating it from scratch.