Fix: correctly check if environment variables are set

This commit is contained in:
maride 2024-06-27 14:57:16 +02:00
parent e295e915d8
commit e5a8d2d21b

View File

@ -10,7 +10,7 @@ if [ -f "/etc/sshutter.conf" ]; then
fi fi
# Check if args are given # Check if args are given
if [ "$WHITELIST" -eq "" ] || [ "$PORT" -eq "" ] || [ "$TARGET" -eq "" ]; then if [ "$WHITELIST" == "" ] || [ "$PORT" == "" ] || [ "$TARGET" == "" ]; then
echo "Error: you need to specify WHITELIST, PORT and TARGET, either in /etc/sshutter.conf or through environment variables." 1>&2 echo "Error: you need to specify WHITELIST, PORT and TARGET, either in /etc/sshutter.conf or through environment variables." 1>&2
exit 1 exit 1
fi fi