Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Monitor your Internet service and provider

Information and Support

  1. Home
  2. Categories
  3. Support forums
  4. ARM
  5. Raspberry Pi 2 Model B working with auto startup
Automatically monitor your Internet service and provider with alerts to problems
Track Internet disconnections, provider outages with historical data, and automated speed testing.
For Windows, Linux, ARM64, ARMa7. Learn more by visiting www.outagesio.com
Notice: If you created an account on app.outagesio.com, simply use the same credentials to log in here.

Raspberry Pi 2 Model B working with auto startup

Scheduled Pinned Locked Moved ARM
1 Posts 1 Posters 532 Views
  • 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.
  • O Offline
    O Offline
    OutagesUser2021
    wrote on last edited by
    #1

    I managed to get the agent working on a Raspberry Pi 2 Model B, and also got it to run automatically on startup after trying a bunch of things. Here are the details:

    Clean install of Raspberry Pi with Desktop from the official Raspberry Pi web site: https://www.raspberrypi.org/software/

    I used the Raspberry Pi imager on Ubuntu 16.04 with a 16 GB microSD card

    Downloaded the agent and created the agentid file per instructions

    Moved the agentid file to /etc

    Moved the agent binary to /usr/sbin

    Set executable permissions on the agent binary

    Ran the agent binary manually to verify connectivity

    Now for the automatic run on startup. Even though my RPi will be running all the time, I wanted to ensure the agent would run on startup in case of a reboot or power outage. I tried several things, including crontab and the rc.local file, but ultimately got it to work by adding the following line to the /etc/rc.local file before the exit 0:

    (sleep 10;/usr/sbin/agentfilename)&

    I had tried it without the "sleep 10" before and it didn't work. I searched the internet for running tasks on RPi startup and came across this page:

    https://stackoverflow.com/questions/50495330/rpi-python-script-fails-to-run-from-etc-rc-local-crontab-systemd

    The page refers to a python script but the situation is similar. Adding the sleep command allows the RPi to wait until other things have loaded before trying to run the agent. The number of seconds may change depending on your RPi performance, so it may take some experimenting to get it to work. But with that added to the rc.local file, the agent runs automatically after every reboot

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups