Skip to content
  • Home
  • Live
  • Categories
  • Recent
  • Tags
  • Popular
  • Groups
  • Login

  • Don't have an account? Register

  • Login or register to search.
Collapse
ISP Tracker ISP Tracker Live & Community
ISP Tracker Live Sign in
ISP Tracker Live & Community
  1. Home
  2. Categories
  3. Support forums
  4. ARM
  5. Raspberry Pi 2 Model B working with auto startup

Raspberry Pi 2 Model B working with auto startup

Scheduled Pinned Locked Moved ARM
1 Posts 1 Posters 897 Views 1 Watching
  • 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
    O
    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

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better đź’—

    Register Login

    While you’re away

    Your Internet does not wait until you’re watching.

    ISP Tracker keeps a history of problems that happen overnight or while you’re away.

    Between speed tests

    What happened between speed tests?

    See how your connection behaves over time—not just when you remember to test it.

    Wider context

    Is it only your connection?

    Similar activity across monitored locations can provide valuable wider context.

    • First post
      Last post
    0
    • Home
    • Live
    • Categories
    • Recent
    • Tags
    • Popular
    • Groups