From b9708a909d50702d33714ada3a40bdb0292a612d Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Mon, 18 Apr 2016 08:35:13 +0200 Subject: [PATCH] =?UTF-8?q?/usr/local/bin=20und=20/root/.ssh=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 74_HOMBOT.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/74_HOMBOT.pm b/74_HOMBOT.pm index 39c0cb5..11e2e44 100644 --- a/74_HOMBOT.pm +++ b/74_HOMBOT.pm @@ -70,8 +70,8 @@ sub HOMBOT_Define($$) { return "too few parameters: define HOMBOT " if( @a != 3 ); return "please check if ssh installed" unless( -X "/usr/bin/ssh" ); - return "please check if /opt/fhem/.ssh/known_hosts exist" unless( -R "/opt/fhem/.ssh/known_hosts" ) || unless( -R "/root/.ssh/known_hosts" );; - return "please check if sshpass installed" unless( -X "/usr/bin/sshpass" ) || unless( -X "/usr/local/bin/sshpass" ); + return "please check if /opt/fhem/.ssh/known_hosts exist" unless( -R "/opt/fhem/.ssh/known_hosts" or -R "/root/.ssh/known_hosts" ); + return "please check if sshpass installed" unless( -X "/usr/bin/sshpass" or -X "/usr/local/bin/sshpass" ); my $sshpass; @@ -849,6 +849,9 @@ sub HOMBOT_Check_Bot_Alive($) { my $hash = $defs{$name}; my $host = $hash->{HOST}; my $sshalive; + my $sshpass; + $sshpass = "/usr/bin/sshpass" unless( -X "/usr/bin/sshpass" ); + $sshpass = "/usr/local/bin/sshpass" unless( -X "/usr/local/bin/sshpass" ); Log3 $name, 3, "HOMBOT ($name) - Start SSH Connection for check Hombot alive";