lldap/generate_secrets.sh
ChevySSinSD 83508a363c
Some checks are pending
Rust / pre_job (push) Waiting to run
Rust / cargo test (push) Blocked by required conditions
Rust / cargo clippy (push) Blocked by required conditions
Rust / cargo fmt (push) Blocked by required conditions
Rust / Code coverage (push) Blocked by required conditions
generate_secrets: improve portability
Updated print_random function definition to be compatible with multiple default shells
2024-07-23 16:36:11 +02:00

12 lines
228 B
Bash
Executable file

#! /bin/sh
print_random () {
LC_ALL=C tr -dc 'A-Za-z0-9!#%&()*+,-./:;<=>?@[\]^_{|}~' </dev/urandom | head -c 32
}
/bin/echo -n "LLDAP_JWT_SECRET='"
print_random
echo "'"
/bin/echo -n "LLDAP_KEY_SEED='"
print_random
echo "'"