From 6b6a9504e4b3793288700f83055a0398adf623dc Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 10 Oct 2023 09:39:38 +0000 Subject: [PATCH] sxmo_suspend.sh: invoke rtl8723cs-wowlan with expected permissions --- hosts/modules/gui/sxmo/hooks/sxmo_suspend.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hosts/modules/gui/sxmo/hooks/sxmo_suspend.sh b/hosts/modules/gui/sxmo/hooks/sxmo_suspend.sh index 2aedef16..ec692fb1 100755 --- a/hosts/modules/gui/sxmo/hooks/sxmo_suspend.sh +++ b/hosts/modules/gui/sxmo/hooks/sxmo_suspend.sh @@ -9,20 +9,18 @@ suspend_time=300 -rtl8723cs-wowlan enable-clean +sudo rtl8723cs-wowlan enable-clean # wake on ssh -rtl8723cs-wowlan tcp --dest-port 22 +sudo rtl8723cs-wowlan tcp --dest-port 22 # wake on notification (ntfy/Universal Push) -rtl8723cs-wowlan tcp --source-port 2587 +sudo rtl8723cs-wowlan tcp --source-port 2587 # wake if someone doesn't know how to route to us, because that could obstruct the above -rtl8723cs-wowlan arp --dest-ip 10.78.79.54 +sudo rtl8723cs-wowlan arp --dest-ip 10.78.79.54 echo "calling suspend for duration: $suspend_time" # XXX: run this in `env` to get the `time` binary instead of the builtin -elapsed="$(env time -f "%e" rtcwake -m mem -s $suspend_time)" || exit 1 - -echo "suspended for $elapsed seconds" +echo "suspended for: $(env time -f "%e" rtcwake -m mem -s $suspend_time) seconds" || exit 1 sxmo_hook_postwake.sh