mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-06 23:55:56 +02:00
clean code
This commit is contained in:
34
ubooquity/rootfs/etc/cont-init.d/93-custom_webUI.sh
Normal file
34
ubooquity/rootfs/etc/cont-init.d/93-custom_webUI.sh
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
################
|
||||
# Alternate UI #
|
||||
################
|
||||
|
||||
if bashio::config.has_value 'theme'; then
|
||||
### Variables
|
||||
CUSTOMUI=$(bashio::config 'theme')
|
||||
bashio::log.info "Alternate theme enabled : $CUSTOMUI. If webui don't work, disable this option"
|
||||
|
||||
### Download WebUI
|
||||
case $CUSTOMUI in
|
||||
"comixology2")
|
||||
curl -s -S -J -L -o /data/release.zip https://github.com/scooterpsu/Comixology_Ubooquity_2/releases/download/v3.4/comixology2.zip >/dev/null \
|
||||
&& unzip -o -q /data/release.zip -d /config/ubooquity/themes/
|
||||
;;
|
||||
|
||||
case $CUSTOMUI in
|
||||
"plextheme-master")
|
||||
curl -s -S -J -L -o /data/release.zip https://github.com/FinalAngel/plextheme/archive/master.zip >/dev/null \
|
||||
&& unzip -q /data/release.zip -d /config/ubooquity/themes/ \
|
||||
# && mv /config/ubooquity/themes/plextheme-master/ /config/ubooquity/themes/
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
### Clean files
|
||||
rm /data/release.zip || true
|
||||
|
||||
### Set preference
|
||||
jq --arg variable $CUSTOMUI '.theme = $variable' /config/ubooquity/preferences.json | sponge /config/ubooquity/preferences.json
|
||||
|
||||
fi
|
||||
Reference in New Issue
Block a user