Fixed shebang
Fixed conditional statments
Removed else block
Refactored requirement checks
Removed unneeded variable
Fixed conditional

There can be other return values than 1 which also evaluates to false.
Added missing exit 1