move config to addons_config

This commit is contained in:
Alexandre
2021-12-29 12:57:15 +01:00
parent fc18cf345f
commit b1842412dd
38 changed files with 320 additions and 93 deletions

View File

@@ -16,7 +16,7 @@ if [ $port > 1 ]; then
sed -i "s|%%port%%|$port|g" /etc/nginx/servers/ingress.conf
sed -i "s|%%interface%%|$(bashio::addon.ip_address)|g" /etc/nginx/servers/ingress.conf
# Removebaseurl
jq '.reverseProxyPrefix = ""' /config/ubooquity/preferences.json | sponge /config/ubooquity/preferences.json
jq '.reverseProxyPrefix = ""' /config/addon_config/ubooquity/preferences.json | sponge /config/addon_config/ubooquity/preferences.json
# Log
bashio::log.info "Ingress enabled"
else

View File

@@ -0,0 +1,16 @@
#!/usr/bin/with-contenv bash
slug=ubooquity
if [ -d /config/$slug ]; then
echo "Moving to new location /config/addons_config/$slug"
mkdir -p /config/addons_config/$slug
chmod 777 /config/addons_config/$slug
mv /config/$slug/* /config/addons_config/$slug/
fi
if [ ! -d /config/addons_config/$slug ]; then
echo "Creating /config/addons_config/$slug"
mkdir -p /config/addons_config/$slug
chmod 777 /config/addons_config/$slug
fi

View File

@@ -3,9 +3,9 @@
###########
# FOLDERS #
###########
FILES=$(jq ".filesPaths[0].pathString" /config/ubooquity/preferences.json)
COMICS=$(jq ".comicsPaths[0].pathString" /config/ubooquity/preferences.json)
BOOKS=$(jq ".booksPaths[0].pathString" /config/ubooquity/preferences.json)
FILES=$(jq ".filesPaths[0].pathString" /config/addon_config/ubooquity/preferences.json)
COMICS=$(jq ".comicsPaths[0].pathString" /config/addon_config/ubooquity/preferences.json)
BOOKS=$(jq ".booksPaths[0].pathString" /config/addon_config/ubooquity/preferences.json)
mkdir -p $FILES $COMICS $BOOKS /config/ubooquity || true
chown -R abc:abc $FILES $COMICS $BOOKS /config/ubooquity || true
mkdir -p $FILES $COMICS $BOOKS /config/addon_config/ubooquity || true
chown -R abc:abc $FILES $COMICS $BOOKS /config/addon_config/ubooquity || true

View File

@@ -13,13 +13,13 @@ if bashio::config.has_value 'theme'; then
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/
unzip -o -q /data/release.zip -d /config/addon_config/ubooquity/themes/
;;
"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/
unzip -q /data/release.zip -d /config/addon_config/ubooquity/themes/
# && mv /config/addon_config/ubooquity/themes/plextheme-master/ /config/addon_config/ubooquity/themes/
;;
esac
@@ -28,6 +28,6 @@ if bashio::config.has_value 'theme'; then
rm /data/release.zip || true
### Set preference
jq --arg variable $CUSTOMUI '.theme = $variable' /config/ubooquity/preferences.json | sponge /config/ubooquity/preferences.json
jq --arg variable $CUSTOMUI '.theme = $variable' /config/addon_config/ubooquity/preferences.json | sponge /config/addon_config/ubooquity/preferences.json
fi