2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

98_serviced: v.1.2.5 - fix sudo

git-svn-id: https://svn.fhem.de/fhem/trunk@20517 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
deespe 2019-11-16 10:40:37 +00:00
parent 5388f060c7
commit 5a7a9e7433

View File

@ -16,7 +16,7 @@ use Blocking;
use Time::HiRes;
use vars qw{%defs};
my $servicedVersion = "1.2.4";
my $servicedVersion = "1.2.5";
sub serviced_shutdownwait($);
@ -149,7 +149,7 @@ sub serviced_Set($@)
if ($cmd eq "start" && ReadingsVal($name,"state","") =~ /^running|starting|failed$/);
my $service = $hash->{SERVICENAME};
my $login = AttrVal($name,"serviceLogin","");
my $sudo = AttrNum($name,"serviceSudo",1) || $login !~ /^root@/ ? "sudo " : "";
my $sudo = AttrNum($name,"serviceSudo",1) || $login =~ /^root@/ ? "sudo " : "";
my $line = AttrVal($name,"serviceStatusLine",3);
my $com;
$com .= "ssh $login '" if ($login);