I have a Rapberry PI3 in a Retroflag SNES case with a dual-fan inside. When I put in an SD-card with Retropie and install the script below the PI shutsdown completely (no standby LED and fans stop spinning). However this script doens’t work on OSMC:
I tried to take the code the shutdown_fan script and implement it into the script for OSMC/Raspbian but can’t get it to work!
#!/bin/sh
This script disables fan control off NESPi+ case
Dedicated to gollumer
cyperghost for https://retropie.org.uk
You need to install raspi-gpio with sudo apt install raspi-gpio
GPIO 4 controls power
place script to /lib/systemd/system-shutdown
and make it executable with chmod +x shutdown_fan
You need root for this
[ “$1” = “poweroff” ] && raspi-gpio set 4 op pn dl
How would I merge this code into the second script so the PI also does a full shutdown in Raspbian, or just disable fan’s at boot-up since I only need them on OSMC.
Did you install raspi-gpio as suggested in the script? Does it work if you manually run the raspi-gpio command? If not, you need to do as @ActionA suggested and contact the seller.
or they dont have enough interest in supporting you there isnt a huge differance between running shell script under osmc vs retropie all it has to have is is the things that its calling in the script again seek support from novice linux users or support from the retailer but it seems pretty straight forward to me alteast.
again gpio follow the instructions on the pins then follow the instructions in the shell script.
Could you clarify exactly what you want to do. If you simply want to power off OSMC, you could try running the command poweroff from a shell script, assuming that you can get it to run in the first place.
The raspi-gpio commands might not all work because the OSMC kernel has been built for running a media server, whereas Raspbian is a general-purpose system with a strong educational emphasis. Please take a look at OSMC raspDAC overlays gpio-shutdown pin 17 &22 for an example of what I’m talking about.