37 |
+$master = $nut{Master} || 'yes'; |
+$master = $nut{Master} || 'yes'; |
38 |
+ |
+ |
39 |
+if ($nutstatus eq 'enabled') { |
+if ($nutstatus eq 'enabled') { |
40 |
+ $OUT .= "enable nut-server.service" if ($master eq 'yes'); |
+ $OUT .= "enable nut-server.service\n" if ($master eq 'yes'); |
41 |
+ $OUT .= "disable nut-server.service" unless ($master eq 'yes'); |
+ $OUT .= "disable nut-server.service\n" unless ($master eq 'yes'); |
42 |
+ $OUT .= "enable nut-monitor.service"; |
+ $OUT .= "enable nut-monitor.service\n"; |
43 |
+ } |
+ } |
44 |
+else |
+else |
45 |
+ { |
+ { |
46 |
+ $OUT .= "enable nut-server.service"; |
+ $OUT .= "disable nut-server.service\n"; |
47 |
+ $OUT .= "enable nut-monitor.service"; |
+ $OUT .= "disable nut-monitor.service\n"; |
48 |
+ } |
+ } |
49 |
+} |
+} |
50 |
diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/20unit e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/20unit |
diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/20unit e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/20unit |