Monitor your Internet service and provider

    Information and Support

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    OutagesIO Support Forums

    Information, Support and FAQ relating to OutagesIO. Monitor your Internet service and provider with optional alerts to connection issues or downtime. For home, small business, IT companies and enterprise. Tracks Internet and provider reliability with useful proof. For Windows 7, 8, 10, Centos 7, 8, Debian 7, Ubuntu, ARM (Raspberry, Tinker Board, etc).

    Learn more by visiting our web site, www.outagesio.com

    Raspberry Pi 2 Model B working with auto startup

    ARM
    1
    1
    396
    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.
    • O
      OutagesUser2021 last edited by

      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 Reply Quote 0
      • First post
        Last post
      Powered by NodeBB | Contributors