summarylogtreecommitdiffstats
path: root/suspend-hacks.sh
diff options
context:
space:
mode:
Diffstat (limited to 'suspend-hacks.sh')
-rw-r--r--suspend-hacks.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/suspend-hacks.sh b/suspend-hacks.sh
new file mode 100644
index 000000000000..2e60e2c27a3a
--- /dev/null
+++ b/suspend-hacks.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+. /etc/conf.d/suspend-hacks
+
+case "$1" in
+ pre)
+ echo "Stopping before $2: $DAEMONS" >&2
+ for daemon in $DAEMONS; do
+ systemctl stop "$daemon"
+ done
+ ;;
+ post)
+ echo "Starting after $2: $DAEMONS" >&2
+ for daemon in $DAEMONS; do
+ systemctl start "$daemon"
+ done
+ ;;
+ *)
+ echo 'meant to be called by systemd suspend!' >&2
+ exit 1
+ ;;
+esac