Move pages under tldr, lint run.sh, update docs

This commit is contained in:
2024-02-21 13:58:43 +02:00
parent 3d653cc7e6
commit 2c475fa62d
4806 changed files with 36 additions and 35 deletions

29
tldr/linux/systemd-creds Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# systemd-creds
> List, show, encrypt and decrypt service credentials.
> More information: <https://www.freedesktop.org/software/systemd/man/systemd-creds.html>.
- Encrypt a file and set a specific name:
`systemd-creds encrypt --name={{name}} {{path/to/input_file}} {{path/to/output}}`
- Decrypt the file again:
`systemd-creds decrypt {{path/to/input_file}} {{path/to/output_file}}`
- Encrypt text from `stdin`:
`echo -n {{text}} | systemd-creds encrypt --name={{name}} - {{path/to/output}}`
- Encrypt the text and append it to the service file (the credentials will be available in `$CREDENTIALS_DIRECTORY`):
`echo -n {{text}} | systemd-creds encrypt --name={{name}} --pretty - - >> {{service}}`
- Create a credential that is only valid until the given timestamp:
`systemd-creds encrypt --not-after="{{timestamp}}" {{path/to/input_file}} {{path/to/output_file}}`