Additional argument check for remote hosts

This commit is contained in:
Serghey Rodin 2018-10-18 14:36:17 +03:00
parent 9a0bbbfd45
commit cbbf27fc46

View file

@ -94,7 +94,7 @@ EOF
if [ "$type" != 'local' ];then
check_args '4' "$#" "TYPE HOST USERNAME PASSWORD [PATH] [PORT]"
is_format_valid 'user' 'host'
is_format_valid 'user' 'host' 'path' 'port'
is_password_valid
if [ "$type" = 'sftp' ]; then
which expect >/dev/null 2>&1