• Snot Flickerman
    link
    fedilink
    English
    32
    edit-2
    2 days ago

    When all else fails…

    crontab -e

    @reboot sleep 300 && sudo ./myshell.sh

    (this is actually broken on some distros)

    • @marcos
      link
      42 days ago

      Though, not every cron supports that.

      Also, if you are packaging software, you have to do it the right way. But if not, it’s often easier to go and install an init script.

      • Snot Flickerman
        link
        fedilink
        English
        32 days ago

        I actually edited my comment right as you were responding. It’s definitely broken in some distros, I think debian/ubuntu.

        • @marcos
          link
          32 days ago

          It’s not broken. You just have to get a cron that supports it. Debian has at least one that does, but it’s not the default one.

      • Snot Flickerman
        link
        fedilink
        English
        11
        edit-2
        2 days ago

        Just to make sure it pops off after fully starting up. I run a lot of old hardware, so it’s useful for me. You may not need a delay.

    • @[email protected]OP
      link
      fedilink
      English
      32 days ago

      Thanks. man 5 crontab says the @reboot syntax is supported, so I’ll give that a try if I don’t stumble upon a different solution.