chore: add better dietpi support to installer (#204)
This commit is contained in:
parent
2d53cc4922
commit
5a67110c0f
@ -161,6 +161,13 @@ main() {
|
||||
set_gpu_mem
|
||||
fi
|
||||
|
||||
if [[ "$(is_dietpi)" = "1" ]]; then
|
||||
msg "\nDietPi detected!"
|
||||
msg "Adjust settings for camera-streamer ...\n"
|
||||
dietpi_cs_settings
|
||||
status_msg "Adjust settings for camera-streamer ..." "0"
|
||||
fi
|
||||
|
||||
if [[ "${CROWSNEST_UNATTENDED}" = "0" ]]; then
|
||||
ask_update_entry
|
||||
fi
|
||||
|
@ -48,6 +48,14 @@ is_raspbian() {
|
||||
fi
|
||||
}
|
||||
|
||||
is_dietpi() {
|
||||
if [[ -f /boot/config.txt ]] && [[ -d /boot/dietpi ]]; then
|
||||
echo "1"
|
||||
else
|
||||
echo "0"
|
||||
fi
|
||||
}
|
||||
|
||||
is_raspberry_pi() {
|
||||
if [[ -f /proc/device-tree/model ]] &&
|
||||
grep -q "Raspberry" /proc/device-tree/model; then
|
||||
@ -262,3 +270,15 @@ add_group_video() {
|
||||
msg "\t==> User ${BASE_USER} is already in group 'video'"
|
||||
fi
|
||||
}
|
||||
|
||||
dietpi_cs_settings() {
|
||||
sudo /boot/dietpi/func/dietpi-set_hardware rpi-codec enable
|
||||
sudo /boot/dietpi/func/dietpi-set_hardware rpi-camera enable
|
||||
|
||||
if [[ "$(is_buster)" = "0" ]]; then
|
||||
if ! grep -q "camera_auto_detect=1" /boot/config.txt; then
|
||||
msg "\nAdd camera_auto_detect=1 to /boot/config.txt ...\n"
|
||||
echo "camera_auto_detect=1" >> /boot/config.txt
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user