403Webshell
Server IP : 45.162.171.154  /  Your IP : 216.73.216.5
Web Server : Apache
System : Linux vxct2015.avnam.net 5.4.106-1-pve #1 SMP PVE 5.4.106-1 (Fri, 19 Mar 2021 11:08:47 +0100) x86_64
User : lpg.com.ar ( 1041)
PHP Version : 8.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/libexec/webmin/virtual-server/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/webmin/virtual-server/restart_script.cgi
#!/usr/bin/perl
# Stop and re-start the Rails server process behind some script

require './virtual-server-lib.pl';
&ReadParse();
$d = &get_domain($in{'dom'});
&can_edit_domain($d) && &can_edit_scripts() || &error($text{'edit_ecannot'});

# Get the script being started
@got = &list_domain_scripts($d);
($sinfo) = grep { $_->{'id'} eq $in{'script'} } @got;
$script = &get_script($sinfo->{'name'});
$sinfo && $script || &error($text{'stopscript_egone'});

# Do it and tell the user
&ui_print_header(&domain_in($d), $text{'scripts_urestart'}, "");

print &text('stopscript_doing', "<i>$script->{'desc'}</i>"),"<br>";
&{$script->{'stop_server_func'}}($d, $sinfo->{'opts'});
sleep(1);	# Give it time to shut down
&$second_print($text{'setup_done'});

print &text('startscript_doing', "<i>$script->{'desc'}</i>"),"<br>";
$err = &{$script->{'start_server_func'}}($d, $sinfo->{'opts'});
if ($err) {
	&$second_print(&text('startscript_failed', $err));
	}
else {
	&$second_print($text{'setup_done'});
	}
&run_post_actions();
if (!$err) {
	&webmin_log("restart", "script", $sinfo->{'name'},
		    { 'ver' => $sinfo->{'version'},
		      'desc' => $sinfo->{'desc'},
		      'dom' => $d->{'dom'} });
	}

&ui_print_footer("edit_script.cgi?dom=$in{'dom'}&script=$in{'script'}",
		  $text{'scripts_ereturn'},
		 "list_scripts.cgi?dom=$in{'dom'}", $text{'scripts_return'},
		 &domain_footer_link($d));

Youez - 2016 - github.com/yon3zu
LinuXploit