diff options
author | Andrew Hills | 2016-08-30 21:29:02 -0400 |
---|---|---|
committer | Andrew Hills | 2016-08-30 21:29:02 -0400 |
commit | 0401897f3bca1ef8c8835ea4a201366180503bc9 (patch) | |
tree | 1922972efd769940c9430198cd5cc8bd92313627 /suspend-hacks.sh | |
download | aur-suspend-hacks.tar.gz |
Release 0
Diffstat (limited to 'suspend-hacks.sh')
-rw-r--r-- | suspend-hacks.sh | 22 |
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 |