From 9727c85bde9dc27e3f8f043fa21cb0bf973f3063 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Fri, 8 Apr 2016 07:58:00 +0200 Subject: [PATCH] =?UTF-8?q?Variable=20Pfade=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 74_HOMBOT.pm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/74_HOMBOT.pm b/74_HOMBOT.pm index 2d9f363..39c0cb5 100644 --- a/74_HOMBOT.pm +++ b/74_HOMBOT.pm @@ -75,12 +75,10 @@ sub HOMBOT_Define($$) { my $sshpass; - my $knowhosts; $sshpass = "/usr/bin/sshpass" unless( -X "/usr/bin/sshpass" ); $sshpass = "/usr/local/bin/sshpass" unless( -X "/usr/local/bin/sshpass" ); - $knowhosts = "/opt/fhem/.ssh/known_hosts" unless( -R "/opt/fhem/.ssh/known_hosts" ) - $knowhosts = "/root/.ssh/known_hosts" unless( -R "/root/.ssh/known_hosts" ) - + + my $name = $a[0]; my $host = $a[2]; my $port = 6260; @@ -855,15 +853,15 @@ sub HOMBOT_Check_Bot_Alive($) { Log3 $name, 3, "HOMBOT ($name) - Start SSH Connection for check Hombot alive"; - $sshalive = qx(/usr/bin/sshpass -p 'most9981' /usr/bin/ssh root\@$host 'uname' ); + $sshalive = qx($sshpass -p 'most9981' /usr/bin/ssh root\@$host 'uname' ); if( $sshalive ) { - my $lgSrvPID = ((split (/\s+/,qx(/usr/bin/sshpass -p 'most9981' /usr/bin/ssh root\@$host 'ps | grep -v grep | grep /usr/bin/lg.srv' )))[1]); + my $lgSrvPID = ((split (/\s+/,qx($sshpass -p 'most9981' /usr/bin/ssh root\@$host 'ps | grep -v grep | grep /usr/bin/lg.srv' )))[1]); if( not defined( $lgSrvPID ) ) { - qx(/usr/bin/sshpass -p 'most9981' /usr/bin/ssh root\@$host '/usr/bin/lg.srv &' ); + qx($sshpass -p 'most9981' /usr/bin/ssh root\@$host '/usr/bin/lg.srv &' ); return "$name|$callingtype|restarted";