Reviewed-by: Bernhard Bitsch Am 03.10.2022 um 17:39 schrieb Robin Roevens: > * Add restart action to services. > * Only display available actions for a service: > Start when service is stopped or Stop and Restart when a service > is running. > > Signed-off-by: Robin Roevens > --- > html/cgi-bin/services.cgi | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi > index d480088a8..498d7fd8e 100644 > --- a/html/cgi-bin/services.cgi > +++ b/html/cgi-bin/services.cgi > @@ -189,8 +189,6 @@ END > > my $status = isautorun($pak,$service,$col); > print "$status "; > - print "$Lang::tr{"; > - print "$Lang::tr{ "; > my $status = isrunningaddon($pak,$service,$col); > $status =~ s/\\[[0-1]\;[0-9]+m//g; > > @@ -300,7 +298,9 @@ sub isrunningaddon (@) { > my $testcmd = @testcmd[0]; > > if ( $testcmd =~ /is\ running/ && $testcmd !~ /is\ not\ running/){ > - $status = "$Lang::tr{'running'}"; > + $status = "$Lang::tr{ "; > + $status .= "$Lang::tr{ "; > + $status .= "$Lang::tr{'running'}"; > $testcmd =~ s/.* //gi; > $testcmd =~ s/[a-z_]//gi; > $testcmd =~ s/\[[0-1]\;[0-9]+//gi; > @@ -323,7 +323,8 @@ sub isrunningaddon (@) { > } > $status .="$memory KB"; > }else{ > - $status = "$Lang::tr{'stopped'}"; > + $status = "$Lang::tr{"; > + $status .= "$Lang::tr{'stopped'}"; > } > return $status; > }