summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-01 21:13:05 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-01 21:13:05 +0200
commit302187d7eea5958a4ec179720d16c899906974ab (patch)
treebd565e5a372ffde6b210a6417bb60bf0d8114ee4
parent2e5633ecfa2287c890e3a5873626fc0d28fc19eb (diff)
use cat EOF
-rwxr-xr-xbin/menuscripts/mpower7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/menuscripts/mpower b/bin/menuscripts/mpower
index 00fb96c..1543a0b 100755
--- a/bin/menuscripts/mpower
+++ b/bin/menuscripts/mpower
@@ -1,8 +1,11 @@
#!/bin/sh
-choice="$(printf 'poweroff
+choice="$(
+cat <<EOF | commander -c
+poweroff
suspend
hibernate
reboot
-' | commander -c)"
+EOF
+)"
[ "$choice" ] && systemctl "$choice"