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:
parent
5388f060c7
commit
5a7a9e7433
@ -16,7 +16,7 @@ use Blocking;
|
|||||||
use Time::HiRes;
|
use Time::HiRes;
|
||||||
use vars qw{%defs};
|
use vars qw{%defs};
|
||||||
|
|
||||||
my $servicedVersion = "1.2.4";
|
my $servicedVersion = "1.2.5";
|
||||||
|
|
||||||
sub serviced_shutdownwait($);
|
sub serviced_shutdownwait($);
|
||||||
|
|
||||||
@ -149,7 +149,7 @@ sub serviced_Set($@)
|
|||||||
if ($cmd eq "start" && ReadingsVal($name,"state","") =~ /^running|starting|failed$/);
|
if ($cmd eq "start" && ReadingsVal($name,"state","") =~ /^running|starting|failed$/);
|
||||||
my $service = $hash->{SERVICENAME};
|
my $service = $hash->{SERVICENAME};
|
||||||
my $login = AttrVal($name,"serviceLogin","");
|
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 $line = AttrVal($name,"serviceStatusLine",3);
|
||||||
my $com;
|
my $com;
|
||||||
$com .= "ssh $login '" if ($login);
|
$com .= "ssh $login '" if ($login);
|
||||||
|
Loading…
Reference in New Issue
Block a user