| Server IP : 89.117.53.150 / Your IP : 216.73.216.11 Web Server : Apache System : Linux server2.hostofiraq.site 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 User : iscmbt-kufa-atu ( 1014) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/virtual-server/ |
Upload File : |
#!/usr/bin/perl
# Restart some feature-related service
require './virtual-server-lib.pl';
&ReadParse();
&can_stop_servers() || &error($text{'restart_ecannot'});
if (&indexof($in{'feature'}, @plugins) < 0) {
# Core feature
$startfunc = "start_service_".$in{'feature'};
$stopfunc = "stop_service_".$in{'feature'};
$err = &$stopfunc($in{'id'});
if (!$err) {
$err = &$startfunc($in{'id'});
if ($err) {
# Delay for Apache to close sockets
sleep(5);
$err = &$startfunc($in{'id'});
}
}
$name = $text{'feature_'.$in{'feature'}};
}
else {
# Plugin
$err = &plugin_call($in{'feature'}, "feature_stop_service", $in{'id'});
if (!$err) {
$err = &plugin_call($in{'feature'}, "feature_start_service", $in{'id'});
}
$name = &plugin_call($in{'feature'}, "feature_name");
}
&error_setup($text{'restart_err'});
&refresh_startstop_status();
&error($err) if ($err);
&webmin_log("restart", $in{'feature'});
if ($in{'show'}) {
# Tell the user
&ui_print_header(undef, $text{'restart_title'}, "");
print &text('restart_done', $name),"<p>\n";
&run_post_actions();
&ui_print_footer("", $text{'index_return'});
}
elsif ($in{'redirect'}) {
&run_post_actions_silently();
&redirect($in{'redirect'});
}
else {
&run_post_actions_silently();
&redirect($ENV{'HTTP_REFERER'});
}