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\n" if ($master eq 'yes'); |
+ $OUT .= "enable nut-server.service\n" if ($master eq 'yes'); |
41 |
+ $OUT .= "disable nut-server.service\n" unless ($master eq 'yes'); |
+ $OUT .= "disable nut-server.service\n" unless ($master eq 'yes'); |
42 |
+ $OUT .= "enable nut-monitor.service\n"; |
+ $OUT .= "enable nut-monitor.service\n"; |
43 |
+ } |
+ } |
44 |
+else |
+else |
45 |
+ { |
+ { |
46 |
+ $OUT .= "disable nut-server.service\n"; |
+ $OUT .= "disable nut-server.service\n"; |
47 |
+ $OUT .= "disable nut-monitor.service\n"; |
+ $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/50koozali.conf/20unit e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/20unit |
51 |
--- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/20unit 1969-12-31 19:00:00.000000000 -0500 |
--- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/20unit 1969-12-31 19:00:00.000000000 -0500 |
52 |
+++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/20unit 2020-11-18 16:59:54.550000000 -0500 |
+++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/20unit 2020-11-18 16:59:54.550000000 -0500 |
53 |
@@ -0,0 +1,3 @@ |
@@ -0,0 +1,3 @@ |
54 |
+[Unit] |
+[Unit] |
55 |
+PartOf=nut.service |
+PartOf=nut.service |
56 |
+After=nut.service |
+After=nut.service |
57 |
diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/40service e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/40service |
diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/40service e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/40service |
58 |
--- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/40service 1969-12-31 19:00:00.000000000 -0500 |
--- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/40service 1969-12-31 19:00:00.000000000 -0500 |
59 |
+++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/40service 2020-11-18 16:59:11.957000000 -0500 |
+++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/40service 2020-11-18 16:59:11.957000000 -0500 |
60 |
@@ -0,0 +1,2 @@ |
@@ -0,0 +1,2 @@ |
61 |
+[Service] |
+[Service] |
62 |
+ExecStartPre=/sbin/e-smith/service-status nut |
+ExecStartPre=/sbin/e-smith/service-status nut |
63 |
diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/80install e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/80install |
diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/80install e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/80install |
64 |
--- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/80install 1969-12-31 19:00:00.000000000 -0500 |
--- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/80install 1969-12-31 19:00:00.000000000 -0500 |
65 |
+++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/80install 2020-11-18 16:59:11.957000000 -0500 |
+++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-monitor.service.d/50koozali.conf/80install 2020-11-18 16:59:11.957000000 -0500 |
66 |
@@ -0,0 +1,2 @@ |
@@ -0,0 +1,2 @@ |
67 |
+[Install] |
+[Install] |
68 |
+WantedBy=sme-server.target |
+WantedBy=sme-server.target |
69 |
diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/20unit e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/20unit |
diff -Nur e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/50koozali.conf/20unit e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/50koozali.conf/20unit |
70 |
--- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/20unit 1969-12-31 19:00:00.000000000 -0500 |
--- e-smith-nutUPS-2.6.0.old/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/50koozali.conf/20unit 1969-12-31 19:00:00.000000000 -0500 |
71 |
+++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/20unit 2020-11-18 16:40:01.717000000 -0500 |
+++ e-smith-nutUPS-2.6.0/root/etc/e-smith/templates/usr/lib/systemd/system/nut-server.service.d/50koozali.conf/50koozali.conf/20unit 2020-11-18 16:40:01.717000000 -0500 |
72 |
@@ -0,0 +1,4 @@ |
@@ -0,0 +1,4 @@ |
73 |
+[Unit] |
+[Unit] |
74 |
+PartOf=nut.service |
+PartOf=nut.service |