Can someone tell me why this isn't evaluating?
I'm using the same sort of input verification earlier in the script and that's working fine, am I missing something stupid?
Code:
# Check if action is valid and run function if it is.
if [ $1 == "start" || "stop" || "restart" ]; then
$1
else
echo "$1 is not a valid action, please use start, stop, or restart."
fi
I'm using the same sort of input verification earlier in the script and that's working fine, am I missing something stupid?