HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/share/webmin/virtual-server/list_running.cgi
#!/usr/bin/perl
# Show a list of all running backups

require './virtual-server-lib.pl';
&ReadParse();
&can_backup_sched() || &error($text{'sched_ecannot'});
&can_backup_domain() || &error($text{'backup_ecannot'});
&ui_print_header(undef, $text{'running_title'}, "");

@scheds = &list_running_backups();
@scheds = grep { &can_backup_sched($_) } @scheds;

# Work out what to show
@table = ( );
$hasowner = 0;
if (&can_backup_domain() == 1) {
	# For master admin, show it if any schedule has a non-master owner
	($hasowner) = grep { $_->{'owner'} } @scheds;
	}
elsif (&can_backup_domain() == 3) {
	# For resellers, always show owner column
	$hasowner = 1;
	}

# Build table of backups
foreach $s (@scheds) {
	my @row;
	push(@row, { 'type' => 'checkbox', 'name' => 'd',
	     	     'value' => $s->{'id'}."-".$s->{'pid'} });
	@dests = &get_scheduled_backup_dests($s);
	@nices = map { &nice_backup_url($_, 1, 1) } @dests;
	my $feature_link = &has_feature_link($s);
	my $flink = &make_link($feature_link.'backup_form.cgi',
			       ['sched', $s->{'id'}]);
	push(@row, &ui_link($flink, join("<br>\n", @nices)));
	push(@row, &nice_backup_doms($s));
	push(@row, &make_date($s->{'started'}));
	push(@row, $text{'running_'.$s->{'scripttype'}} || $s->{'scripttype'});
	push(@table, \@row);
	}

# Output the form and table
print &ui_form_columns_table(
	"kill_running.cgi",
	[ [ 'stop', $text{'running_stop'} ] ],
	1,
	[ ],
	undef,
	[ "", $text{'sched_dest'}, $text{'sched_doms'},
	  $text{'running_started'}, $text{'running_mode'},
	],
	100, \@table, [ '', 'string', 'string' ],
	0, undef,
	&ui_alert_box($text{'running_none'}, 'info', undef, undef, ''));
if (!@table) {
	print &text('running_link', 'list_sched.cgi', 'backuplog.cgi'),"<p>\n";
	}

&ui_print_footer("", $text{'index_return'});