File fix-system-sleep.patch of Package opensnitch

Index: opensnitch-1.7.2/utils/scripts/restart-opensnitch-onsleep.sh
===================================================================
--- opensnitch-1.7.2.orig/utils/scripts/restart-opensnitch-onsleep.sh
+++ opensnitch-1.7.2/utils/scripts/restart-opensnitch-onsleep.sh
@@ -7,8 +7,9 @@
 # Copy it to /lib/systemd/system-sleep/ with any name and exec permissions.
 #
 if [ "$1" == "pre" ]; then
-    service opensnitchd stop
+    systemctl stop opensnitch
 elif [ "$1" == "post" ]; then
-    service opensnitchd stop
-    service opensnitchd start
+    if systemctl is-enabled --quiet opensnitch ; then
+        systemctl restart opensnitch
+    fi
 fi
openSUSE Build Service is sponsored by