summarylogtreecommitdiffstats
path: root/suspend-hacks.sh
blob: 2e60e2c27a3ab941772fe7c7f834a0c4be510436 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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