Wiki useful shell scripts not so useful

  • Hi all.

    Somebody a while back pointed me in the direction of useful shell scripts wiki for wanting to wake and sleep my computer running libreelec.

    Im having a hard time trying to get it working correctly.

    I have created a file in the config directory containing the scripts from here Useful shell scripts []

    I have then added what I need to to the file

    After that I have ran chmod +x on both files to make sure the executable and rebooted.

    Then running my pi over samba shares this will prevent my computer from going to sleep, and when stopping the media on the pi the main computer will go to sleep.

    My problem is that the next time the computer wakes it will not sleep after the time I have set, it's almost like the script is keeping it awake even though nothing is connecting to it, so basically it only works once.

    Anybody know anything about this.


  • Untested, but try this variant:

    Flexin' vinyl, jammin' break beats. 8)

  • Thanks will give this a try tomorrow when I get a spare half hour.

    Im wondering if it might be something to do with the autostart script to be honest.

    The fact it works with a reboot, and works if I power it of then on again, but when it sleeps then wakes that's when it no longer works.

    I'll try the above script and let you know.


  • Hi, I've managed to solve this.

    It was indeed my file

    Using the script from the wiki for the prevent idle shutdown works fine.

    Ive added stuff to the in the past and though I knew what I was doing lol.

    Looking at the wiki for autostart it became clear I needed to use the nohup command to keed the script running.

    Thanks again for the help suppose I just needed a little extra time on this to solve it.