How to run script on resume/wake up?

Hello.
I would like to run ascript on kodi wakeup.
Already tried ./config/autorun.sh and autoexec.py but those run only on boot up/power on.
Found some tutorial but for LibreELEC, nothing for CoreELEC. Is it possible with CE?
Thank you

CoreELEC is a fork so same instructions applies to it.

It is working, almost.

Echo part is printing but the called script is not executed.

#!/bin/sh
case "$1" in
   pre)
 echo "suspend" >> "/tmp/test.log"
     ;;
   post)      
 echo "resume" >> "/tmp/test.log"
 ./renewWebOs.sh
     ;;
esac

I know renewWebOs.sh is correct because it was working with autoexec.py and autorun.sh
Is internet connection available when onResume scripts are called?

Use full path for the renewWebOs.sh.
For network it probably depends. If not use some delay before executing the script.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.