mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-26 01:06:04 +02:00
Create 30-graphic_drivers.sh
This commit is contained in:
36
photoprism/rootfs/etc/cont-init.d/30-graphic_drivers.sh
Normal file
36
photoprism/rootfs/etc/cont-init.d/30-graphic_drivers.sh
Normal 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
|
||||||
Reference in New Issue
Block a user