shutdown.sh script

  • I want to turn off hyperion lights if the system is turned off with the button or over shut down menu even if video is still playing.
    So i have created shutdown.sh script with:


    But the command does not work. If i execute the command from the script it turns off the lights.

    Any idea?

  • iLLiac4: You are calling the binary from script but you are probably missing LD_LIBRARY_PATH. DaVu found a script:

    hyperion-remote.sh

    Please try that instead. Notice the ".sh" at the end.

    But you need to edit the script first!!!!
    [hr]
    As suggested by @seo: It's best to edit: /storage/.config/system.d/service.hyperion.service
    and add your command to

    Code
    ExecStopPre: ....

    Edited once, last by GDPR-1 (November 4, 2016 at 9:19 AM).


  • iLLiac4: You are calling the binary from script but you are probably missing LD_LIBRARY_PATH. DaVu found a script:

    hyperion-remote.sh

    Please try that instead. Notice the ".sh" at the end.

    But you need to edit the script first!!!!
    [hr]
    As suggested by @seo: It's best to edit: /storage/.config/system.d/service.hyperion.service
    and add your command to

    Code
    ExecStopPre: ....


    This is sym link to addons folder so it will get overwritten everytime the addon updates.

  • Thats not an issue cp and overwrite the symlink with the actual systemd unit edit and test it. If it's working use the following command:

    Code
    chattr +i hyperiond.service

    Even root can't change, overwrite or delete that file anymore. If you want to edit it use a "chattr -i Filename".