Fix bug in conditional expression

Shellcheck complains that use of '-a' is not well-defined and recommends '&&', and also to separate each expression between '&&' with brackets.
This commit is contained in:
Jeffrey Serio 2020-07-06 20:17:03 -05:00 committed by GitHub
parent f3fb17fb67
commit e4c4d3f9f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
#!/bin/sh
if [ "$1" = "thelounge" -a "$(id -u)" = '0' ]; then
if [ "$1" = "thelounge" ] && [ "$(id -u)" = '0' ]; then
find "${THELOUNGE_HOME}" \! -user node -exec chown node '{}' +
exec su node -c "$*"
fi