summarylogtreecommitdiffstats
path: root/cupswrappermfcl8690cdw.patch
blob: ff24fe49c246257bfaa4d1a4cbdfb5aca496fe02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--- /home/JohannaNIX/Downloads/brother-mfc-l8690cdw-cupswrapper/cupswrappermfcl8690cdw	2025-01-24 15:33:12.351893332 +0100
+++ /home/JohannaNIX/Downloads/brother-mfc-l8690cdw-cupswrapper/cupswrappermfcl8690cdw_mod	2025-01-24 15:39:47.945298669 +0100
@@ -49,8 +49,6 @@
   rm -f /opt/brother/${device_model}/${printer_model}/cupswrapper/brother_lpdwrapper_${printer_model}
 #  rm -f /usr/local/Brother/${device_model}/${printer_model}/cupswrapper/brcupsconfpt1
-if [  -e /etc/init.d/cups ]; then
-   /etc/init.d/cups restart
-elif [  -e /etc/init.d/cupsys ]; then
-   /etc/init.d/cupsys restart
+if systemctl is-active --quiet cups; then
+  systemctl restart cups
 fi
 #  /etc/init.d/cups restart
@@ -59,8 +57,6 @@
 if [ "$1" = "-r" ]; then
   lpadmin -x ${printer_name}
-if [  -e /etc/init.d/cups ]; then
-   /etc/init.d/cups restart
-elif [  -e /etc/init.d/cupsys ]; then
-   /etc/init.d/cupsys restart
+if systemctl is-active --quiet cups; then
+  systemctl restart cups
 fi
 #  /etc/init.d/cups restart
@@ -292,16 +288,10 @@
 #chmod a+w /opt/brother/${device_model}/${printer_model}/inf/br${printer_model}rc
 #chmod a+w /opt/brother/${device_model}/${printer_model}/inf
-if [ -e /etc/init.d/lpd ]; then
-   /etc/init.d/lpd stop
-fi
-if [  -e /etc/init.d/lprng ]; then
-   /etc/init.d/lprng stop
+if systemctl is-active --quiet lpd; then
+  systemctl restart lpd
 fi
 
-
-if [  -e /etc/init.d/cups ]; then
-   /etc/init.d/cups restart
-elif [  -e /etc/init.d/cupsys ]; then
-   /etc/init.d/cupsys restart
+if systemctl is-active --quiet cups; then
+  systemctl restart cups
 fi