Debian Start/Autostart

  • Sorry for the noob-ish question.

    I have previously installed Hyperion on an OG Raspi, but am in the process of moving to an x86 Debian machine for more processing power. I have installed from the deb file successfully on Debian 10, but am having difficulty starting the service / setting it up to start on boot. Previous installs on pis automatically installed the service and set it to start on boot, but it does not seem that this is the case with the Debian version. Can someone walk me through setting up the service after install?

  • i have a step to step plan how i have it myself.



    automatic startup of Hyperion.NG


    With the following command (under Putty) you create a new file called hyperion.service under / lib / systemd / system /


    Code in terminal:

    sudo nano /lib/systemd/system/hyperion.service

    ... and insert the following content.


    [Unit]

    Description = Hyperion ambient light systemd service

    Na = network.target


    [Maintenance]

    ExecStart = / usr / local / bin / hyperiond

    WorkingDirectory = / usr / local / share / hyperion / bin

    User = pi

    TimeoutStopSec = 5

    KillMode = mixed

    Restart = on failure

    RestartSec = 2


    [To install]

    WantedBy = multi-user.target


    edit: don't forget to save (enter and Ctrl + o) and exit (Ctrl + x) from nano.


    Finally, restart the systemd service and activate / start the Hyperion.NG service.

    Code:

    sudo systemctl daemon-reload

    sudo systemctl enable hyperion.service

    sudo systemctl starts hyperion.service

  • Thanks for pointing me in the right direction!


    A few notes for anyone who stumbles across this in the future:


    x86 Debian has a different file structure than a pi.

    Your code:

    Code
    ExecStart = / usr / local / bin / hyperiond
    WorkingDirectory = / usr / local / share / hyperion / bin

    Translates to:

    Code
    ExecStart=/usr/bin/hyperiond
    WorkingDirectory=/usr/share/hyperion/bin

    for an x86 Debian machine. (I'm not sure why your code was injected with all the spaces, but they should also be removed.)


    Additionally:

    The user should be hyperion (or whatever your local user is) The pi user is not default like on Raspberry units.


    There was a typo in the code to start the service:

    sudo systemctl starts hyperion.service

    Should be:

    sudo systemctl start hyperion.service


    So, my final code ended up looking like this:


    Thanks again!

  • (I'm not sure why your code was injected with all the spaces, but they should also be removed

    good that it worked!



    yes i saw that too but i have some personal things and my head was not really with it to notice immediatelly :)

  • little note to add;



    he was right and because of one weird reason the spaces where there, ........ anyway

    i have a few pointers.




    Restart=on-failure

    RestartSec=2




    when you want the Hyperion service to shut off but want to still use your PI because you want to do an installation or whatever,

    then you can terminate the function of restart.

    just add =off behind the line Restart on failure, (on-failure becomes off)


    if you want that Hyperion waits with rebooting then extend time only in line RestartSec=digit :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!