2 # Start or stop a bunch of win32 services
4 require './init-lib.pl';
6 @sel = split(/\0/, $in{'d'});
7 @sel || &error($text{'mass_enone2'});
9 $start = 1 if ($in{'start'} || $in{'addboot_start'});
10 $stop = 1 if ($in{'stop'} || $in{'delboot_stop'});
11 $enable = 1 if ($in{'addboot'} || $in{'addboot_start'});
12 $disable = 1 if ($in{'delboot'} || $in{'delboot_stop'});
14 &ui_print_unbuffered_header(undef, $start || $enable ? $text{'mass_start'}
15 : $text{'mass_stop'}, "");
17 if ($start || $stop) {
18 # Starting or stopping a bunch of services
19 $access{'bootup'} || &error($text{'ss_ecannot'});
22 print &text('mass_starting', "<tt>$s</tt>"),"<p>\n";
23 $err = &start_win32_service($s);
26 print &text('mass_stopping', "<tt>$s</tt>"),"<p>\n";
27 $err = &stop_win32_service($s);
30 print "<pre>$err</pre>";
31 print $text{'mass_failed'},"<p>\n";
34 print $text{'mass_ok'},"<p>\n";
39 if ($enable || $disable) {
40 # Enable or disable at boot
41 $access{'bootup'} == 1 || &error($text{'edit_ecannot'});
44 print &text('mass_enable', "<tt>$b</tt>"),"<p>\n";
45 &enable_win32_service($b);
48 print &text('mass_disable', "<tt>$b</tt>"),"<p>\n";
49 &disable_win32_service($b);
52 &webmin_log($enable ? 'massenable' : 'massdisable', 'action',
56 &ui_print_footer("", $text{'index_return'});