mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-25 15:30:32 +02:00
Update 91-secrets.sh
This commit is contained in:
@@ -1,9 +1,13 @@
|
|||||||
#!/command/with-contenv bashio
|
#!/usr/bin/with-contenv bashio
|
||||||
# shellcheck shell=bash
|
# shellcheck shell=bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
generate_secret() {
|
generate_secret() {
|
||||||
|
# Avoid SIGPIPE from `tr` when `head` terminates early under pipefail.
|
||||||
|
(
|
||||||
|
set +o pipefail 2>/dev/null || true
|
||||||
tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 64
|
tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 64
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
set_option() {
|
set_option() {
|
||||||
|
|||||||
Reference in New Issue
Block a user