Add configuration for a shutdown button
This commit is contained in:
parent
c05c4a4183
commit
727ab9ae83
@ -63,6 +63,13 @@ echo
|
|||||||
|
|
||||||
cd "$DIR_PATH" && ./hydrophonitor/scripts/setup-pressure-depth.sh
|
cd "$DIR_PATH" && ./hydrophonitor/scripts/setup-pressure-depth.sh
|
||||||
|
|
||||||
|
# Setup shutdown button
|
||||||
|
echo
|
||||||
|
echo "### Setup shutdown button"
|
||||||
|
echo
|
||||||
|
|
||||||
|
cd "$DIR_PATH" && ./hydrophonitor/scripts/setup-shutdown-button.sh
|
||||||
|
|
||||||
# Set up cron job to start the recordings at boot
|
# Set up cron job to start the recordings at boot
|
||||||
echo
|
echo
|
||||||
echo "### Set up a cron job to start the recordings at boot"
|
echo "### Set up a cron job to start the recordings at boot"
|
||||||
|
11
scripts/setup-shutdown-button.sh
Normal file
11
scripts/setup-shutdown-button.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
echo "Setting up shutdown button"
|
||||||
|
|
||||||
|
config="dtoverlay=gpio-shutdown,gpio_pin=21,gpio_pull=up,active_low=1"
|
||||||
|
|
||||||
|
if ! grep -q "$config" /boot/config.txt; then
|
||||||
|
echo "$config" | sudo tee -a /boot/config.txt
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user