activate control
This commit is contained in:
@@ -10,11 +10,15 @@
|
||||
# Generated files
|
||||
##############
|
||||
|
||||
# systemd itself is detected by the top-level systemdservice.cmake.
|
||||
# This webui submodule only consumes WITH_SYSTEMD and SYSTEMD_SERVICES_INSTALL_DIR.
|
||||
if(NOT DEFINED MARS_NWE_SYSTEMD_SERVICE)
|
||||
set(MARS_NWE_SYSTEMD_SERVICE "mars-nwe-serv.service" CACHE STRING "MARS_NWE systemd service name")
|
||||
endif()
|
||||
|
||||
find_program(SYSTEMCTL_EXECUTABLE systemctl)
|
||||
if(NOT DEFINED SYSTEMCTL_EXECUTABLE)
|
||||
find_program(SYSTEMCTL_EXECUTABLE systemctl)
|
||||
endif()
|
||||
if(NOT SYSTEMCTL_EXECUTABLE)
|
||||
set(SYSTEMCTL_EXECUTABLE "/usr/bin/systemctl")
|
||||
endif()
|
||||
|
||||
@@ -113,8 +113,11 @@ foreach $p ( @p )
|
||||
}
|
||||
@c = split( '/', $c );
|
||||
|
||||
if( $c[0] eq 'cgi-bin' && $c[1] eq 'control' )
|
||||
if( ( $c[0] eq 'service' && $c[1] eq 'control' ) ||
|
||||
( $c[0] eq 'cgi-bin' && $c[1] eq 'control' ) )
|
||||
{
|
||||
# Service control must run before drop_root().
|
||||
# /service/control is the preferred path; /cgi-bin/control is kept as a legacy alias.
|
||||
$ENV{'QUERY_STRING'} = $cc;
|
||||
$ENV{'REQUEST_URI'} = $request_uri;
|
||||
$ENV{'SMART_SYSTEMCTL_PATH'} = $smart_systemctl_path if defined $smart_systemctl_path;
|
||||
|
||||
@@ -100,12 +100,12 @@
|
||||
<DIV CLASS="actions">
|
||||
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">
|
||||
<TR>
|
||||
<TD WIDTH="25%"><A CLASS="action" HREF="/cgi-bin/control?start">Start <TT>MARS_NWE</TT></A></TD>
|
||||
<TD WIDTH="25%"><A CLASS="action secondary" HREF="/cgi-bin/control?stop">Stop <TT>MARS_NWE</TT></A></TD>
|
||||
<TD WIDTH="50%"><A CLASS="action" HREF="/service/control?start">Start <TT>MARS_NWE</TT></A></TD>
|
||||
<TD WIDTH="50%"><A CLASS="action secondary" HREF="/service/control?stop">Stop <TT>MARS_NWE</TT></A></TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD WIDTH="25%"><A CLASS="action secondary" HREF="/cgi-bin/control?restart">Restart <TT>MARS_NWE</TT></A></TD>
|
||||
<TD WIDTH="25%"><A CLASS="action secondary" HREF="/cgi-bin/control?status">Status <TT>MARS_NWE</TT></A></TD>
|
||||
<TD WIDTH="50%"><A CLASS="action secondary" HREF="/service/control?restart">Restart <TT>MARS_NWE</TT></A></TD>
|
||||
<TD WIDTH="50%"><A CLASS="action secondary" HREF="/service/control?status">Status <TT>MARS_NWE</TT></A></TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</DIV>
|
||||
|
||||
Reference in New Issue
Block a user