• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
ModalAI Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
    • Register
    • Login

    Start .sh script on boot

    VOXL
    2
    3
    266
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Henry Cappel
      last edited by 25 Oct 2022, 20:15

      Is there a simple way to start a bash script on boot of the device? I'm finding that common linux solutions aren't working on yocto.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • T
        tom admin
        last edited by 26 Oct 2022, 16:48

        @Henry-Cappel The easiest way is with a systemd service that lives in /etc/systemd/system

        If you go to that directory on VOXL you can see a bunch of examples of how we do it.

        Once you have a $SERVICE_NAME.service file created, you can enable it to run on boot with:
        systemctl enable $SERVICE_NAME

        or disable it from running on boot with
        systemctl disable $SERVICE_NAME

        1 Reply Last reply Reply Quote 0
        • H
          Henry Cappel
          last edited by 26 Oct 2022, 16:55

          Thanks so much!! This is super easy solution

          1 Reply Last reply Reply Quote 0
          1 out of 3
          • First post
            1/3
            Last post
          Powered by NodeBB | Contributors