RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Help With Fan Script

    Scheduled Pinned Locked Moved Help and Support
    retropie 4.6scriptboot problem
    3 Posts 2 Posters 338 Views
    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
      OldSchool
      last edited by

      Hi everyone,

      I have a pi4, 4gb, with retropie 4.6. I installed a fan and created the scripts for it according to this:

      https://hackernoon.com/how-to-control-a-fan-to-cool-the-cpu-of-your-raspberrypi-3313b6e7f92c#.9j5869iq2

      The issue I'm having is that when I try to create the symbolic link I type in the command line

      sudo update-rc.d /etc/init.d/fanstart defaults
      

      with fanstart.sh being my startup script in the init.d directory, and what I get back is

      update-rc.d: error: initscript does not exist: /etc/init.d//etc/init.d/fanstart.sh
      

      I've made it executable with the chmod +x command but for whatever reason it keeps coming up as not existing.

      I can run the actual fan script fine if I start it manually from the command line, and it works other than the fact the fan doesn't shut off when it should (which is a different problem), but my focus now is just to get the script to start on boot. Maybe with the way retropie is setup there is a better way to start something in boot than a script in the init.d directory. I'm unsure.

      I know it's more of a general raspberry pi problem, but I don't know if there is a better place to ask this because I figured there has to be someone here who has made a startup script for retropie, and because of how retropie is setup the way to set up the script might be different than on generic raspbian, and I would get better help here than in a different forum.

      Thank you for any help you might have.

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by mitu

        Recent Raspbian OS releases don't use SysVInit style scripts to start/stop services, so the service part from that page doesn't apply. Look up how to create a systemd service to start your python script on boot - see an example here.

        O 1 Reply Last reply Reply Quote 1
        • O
          OldSchool @mitu
          last edited by

          @mitu
          Ah, got it. I thought my method might be out of date but I'm new to digging this deep, and it's a frustrating but fun learning process. Thank you a ton for the help, I'll check that out once I get the chance today.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

          Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.