Hi there,
the "Prevent Idle Shutdown" script did not work for me on Libreelec 8.2.4 (Generic), so after short investigation I found that kodi with default skin estuary does not support action allowidleshutdown (ERROR: Keymapping error: no such action 'allowidleshutdown' defined).
I changed line 17 like that and no it works:
Code
#/bin/sh
IDLE_SHUTDOWN_ALLOWED_LAST_STATE=-1
while true
do
KODI_RUNNING=`ps -A | grep kodi.bin | grep -v grep | wc -l`
if [ 1 == $KODI_RUNNING ] ; then
SSH_ACTIVE=`netstat -tnpa | grep 'tcp.*:22.*ESTABLISHED.*' | wc -l`
NFS_ACTIVE=`netstat -tnpa | grep 'tcp.*:111.*ESTABLISHED.*' | wc -l`
SMB_ACTIVE=`netstat -tnpa | grep 'tcp.*:445.*ESTABLISHED.*' | wc -l`
[ $SSH_ACTIVE -gt 0 -o $NFS_ACTIVE -gt 0 -o $SMB_ACTIVE -gt 0 ] && IDLE_SHUTDOWN_ALLOWED=1 || IDLE_SHUTDOWN_ALLOWED=0
if [ $IDLE_SHUTDOWN_ALLOWED_LAST_STATE != $IDLE_SHUTDOWN_ALLOWED ] ; then
IDLE_SHUTDOWN_ALLOWED_LAST_STATE=$IDLE_SHUTDOWN_ALLOWED
kodi-send --action="InhibitIdleShutdown(false)"
if [ 0 == $IDLE_SHUTDOWN_ALLOWED ] ; then
kodi-send --action="InhibitIdleShutdown(false)"
else
kodi-send --action="InhibitIdleShutdown(true)"
fi
fi
fi
sleep 60
done
Display More
Can you change this on the wiki page Useful shell scripts [LibreELEC.wiki]? Also a link to "autostart.sh" is not working.