diff options
Diffstat (limited to 'pkgs/sources/scripts/source/wrappers/hibernate.sh')
-rwxr-xr-x | pkgs/sources/scripts/source/wrappers/hibernate.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/sources/scripts/source/wrappers/hibernate.sh b/pkgs/sources/scripts/source/wrappers/hibernate.sh new file mode 100755 index 00000000..30868fd1 --- /dev/null +++ b/pkgs/sources/scripts/source/wrappers/hibernate.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env dash + +# shellcheck source=/dev/null +SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH + +context="$(task _get rc.context)" +[ "$context" ] && task context none + +# We have ensured that only one task is active +active="$(task +ACTIVE _ids)" +[ "$active" ] && task stop "$active" + +systemctl hibernate "$@" + +# vim: ft=sh |