Skip to content

Commit

Permalink
Updated 'gpio-poweroff' for existing builds
Browse files Browse the repository at this point in the history
Fully(?) resolves issue #130 - subject to extended soak-testing.
  • Loading branch information
greiginsydney authored Feb 14, 2023
1 parent c31d7f7 commit 7ddb37f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Raspberry Pi/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,14 @@ dtoverlay=gpio-led,gpio=27,trigger=default-on,active_low
END
fi

if grep -q '^dtoverlay=gpio-poweroff' /boot/config.txt;
then
echo -e ""$YELLOW"'/boot/config.txt' contains legacy dtoverlay=gpio-poweroff. Updating.""$RESET"
sed -i 's/^dtoverlay=gpio-poweroff,gpiopin=27,active_low/dtoverlay=gpio-led,gpio=27,trigger=default-on,active_low/g' /boot/config.txt
else
echo "Skipped: '/boot/config.txt' does not contain legacy dtoverlay=gpio-poweroff."
fi

if [ -f www/intvlm8r.old ];
then
mv -fv www/intvlm8r.old www/intvlm8r.bak
Expand Down

0 comments on commit 7ddb37f

Please sign in to comment.