Create 30-graphic_drivers.sh

This commit is contained in:
Alexandre
2023-01-22 17:56:28 +01:00
committed by GitHub
parent 2279d2286e
commit 2ea63b4194

View File

@@ -0,0 +1,36 @@
#!/usr/bin/with-contenv bashio
# shellcheck shell=bash
# shellcheck disable=SC2015
if bashio::config.has_value 'graphic_drivers'; then
GRAPHIC_DRIVERS="$(bashio::config 'graphic_drivers')"
bashio::log.info "Installing selected graphic drivers : $GRAPHIC_DRIVERS..."
### Download WebUI
case "$GRAPHIC_DRIVERS" in
"mesa")
apt-get update
apt-get install -yqq *mesa* >/dev/null
echo "... done"
;;
"nvidia")
apt-get update
apt-get install -yqq *nvidia* >/dev/null
echo "... done"
;;
"radeon")
apt-get update
apt-get install -yqq *radeon* >/dev/null
echo "... done"
;;
*)
exit 0
echo "... no drivers selected"
;;
esac
fi