homeassistant: More robust auth command
This commit is contained in:
parent
5900c39b59
commit
adbc274797
1 changed files with 6 additions and 0 deletions
|
@ -2,6 +2,12 @@
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
umask 077
|
||||||
|
|
||||||
|
if [ -z "${username:-}" ] || [ -z "${password:-}" ]; then
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$(echo "$username" | sed -r 's/^[a-z]+$/x/')" != "x" ]; then
|
if [ "$(echo "$username" | sed -r 's/^[a-z]+$/x/')" != "x" ]; then
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue