From 96e2ea6a5653a475c79d637b00fe690090b8482f Mon Sep 17 00:00:00 2001 From: Ali Hatami Tajik Date: Fri, 7 Apr 2023 17:33:35 +0330 Subject: [PATCH] Add sleep utility This script will executed when sleeping the waking up. --- src/scripts/sleeputil.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/scripts/sleeputil.sh diff --git a/src/scripts/sleeputil.sh b/src/scripts/sleeputil.sh new file mode 100644 index 0000000..d92e8c4 --- /dev/null +++ b/src/scripts/sleeputil.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# should be moved to the /lib/systemd/system-sleep/ + +PATH=/sbin:/usr/sbin:/bin:/usr/bin + +case "$1" in + pre) + #code execution BEFORE sleeping/hibernating/suspending + ;; + post) + #code execution AFTER resuming + ;; +esac + +exit 0 \ No newline at end of file