/addons_config/

This commit is contained in:
Alexandre
2021-12-29 13:23:54 +01:00
parent b1842412dd
commit 03fc02af43
6 changed files with 23 additions and 23 deletions

View File

@@ -32,14 +32,14 @@ bashio::log.info "Joal updated"
##################
# If config doesn't exist, create it
if [ ! -f /config/addon_config/joal/config.json ]; then
if [ ! -f /config/addons_config/joal/config.json ]; then
bashio::log.info "Symlinking config files"
mkdir -p /config/addon_config/joal
cp /data/joal/config.json /config/addon_config/joal/config.json
mkdir -p /config/addons_config/joal
cp /data/joal/config.json /config/addons_config/joal/config.json
fi
# Refresh symlink
ln -sf /config/addon_config/joal/config.json /data/joal/config.json
ln -sf /config/addons_config/joal/config.json /data/joal/config.json
###############
# SET VARIABLES #

View File

@@ -5,7 +5,7 @@
##########
# Define preferences line
cd /config/addon_config/qBittorrent/
cd /config/addons_config/qBittorrent/
LINE=$(sed -n '/Preferences/=' qBittorrent.conf)
LINE=$((LINE + 1))
@@ -70,7 +70,7 @@ fi
# WHITELIST #
################
cd /config/addon_config/qBittorrent/
cd /config/addons_config/qBittorrent/
if bashio::config.has_value 'whitelist'; then
WHITELIST=$(bashio::config 'whitelist')
#clean data
@@ -84,7 +84,7 @@ fi
# USERNAME #
###############
cd /config/addon_config/qBittorrent/
cd /config/addons_config/qBittorrent/
if bashio::config.has_value 'Username'; then
USERNAME=$(bashio::config 'Username')
#clean data
@@ -131,8 +131,8 @@ if bashio::config.has_value 'customUI'; then
rm /webui/*.zip
CUSTOMUIDIR="$(dirname "$(find /webui/$CUSTOMUI -iname "public" -type d)")"
# Set qbittorrent
sed -i "$LINE i\WebUI\\\AlternativeUIEnabled=true" /config/addon_config/qBittorrent/qBittorrent.conf
sed -i "$LINE i\WebUI\\\RootFolder=$CUSTOMUIDIR" /config/addon_config/qBittorrent/qBittorrent.conf
sed -i "$LINE i\WebUI\\\AlternativeUIEnabled=true" /config/addons_config/qBittorrent/qBittorrent.conf
sed -i "$LINE i\WebUI\\\RootFolder=$CUSTOMUIDIR" /config/addons_config/qBittorrent/qBittorrent.conf
# Set nginx
#sed -i "s=/vuetorrent/public/=$CUSTOMUIDIR/public/=g" /etc/nginx/servers/ingress.conf
#sed -i "s=vue.torrent=$CUSTOMUI.torrent=g" /etc/nginx/servers/ingress.conf
@@ -144,4 +144,4 @@ fi
##########
bashio::log.info "Default username/password : admin/adminadmin"
bashio::log.info "Configuration can be found in /config/addon_config/qBittorrent"
bashio::log.info "Configuration can be found in /config/addons_config/qBittorrent"

View File

@@ -37,9 +37,9 @@ if bashio::config.true 'openvpn_enabled'; then
# CONFIGURE QBITTORRENT #
#########################
QBT_CONFIG_FILE="/config/addon_config/qBittorrent/qBittorrent.conf"
QBT_CONFIG_FILE="/config/addons_config/qBittorrent/qBittorrent.conf"
# Define preferences line
cd /config/addon_config/qBittorrent/
cd /config/addons_config/qBittorrent/
LINE=$(sed -n '/Preferences/=' qBittorrent.conf)
LINE=$((LINE + 1))
@@ -76,7 +76,7 @@ else
# REMOVE OPENVPN #
##################
# Ensure no redirection by removing the direction tag
cd /config/addon_config/qBittorrent/
cd /config/addons_config/qBittorrent/
sed -i '/Interface/d' qBittorrent.conf
bashio::log.info "Direct connection without VPN enabled"

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/addon_config/ubooquity/preferences.json | sponge /config/addon_config/ubooquity/preferences.json
jq '.reverseProxyPrefix = ""' /config/addons_config/ubooquity/preferences.json | sponge /config/addons_config/ubooquity/preferences.json
# Log
bashio::log.info "Ingress enabled"
else

View File

@@ -3,9 +3,9 @@
###########
# FOLDERS #
###########
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)
FILES=$(jq ".filesPaths[0].pathString" /config/addons_config/ubooquity/preferences.json)
COMICS=$(jq ".comicsPaths[0].pathString" /config/addons_config/ubooquity/preferences.json)
BOOKS=$(jq ".booksPaths[0].pathString" /config/addons_config/ubooquity/preferences.json)
mkdir -p $FILES $COMICS $BOOKS /config/addon_config/ubooquity || true
chown -R abc:abc $FILES $COMICS $BOOKS /config/addon_config/ubooquity || true
mkdir -p $FILES $COMICS $BOOKS /config/addons_config/ubooquity || true
chown -R abc:abc $FILES $COMICS $BOOKS /config/addons_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/addon_config/ubooquity/themes/
unzip -o -q /data/release.zip -d /config/addons_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/addon_config/ubooquity/themes/
# && mv /config/addon_config/ubooquity/themes/plextheme-master/ /config/addon_config/ubooquity/themes/
unzip -q /data/release.zip -d /config/addons_config/ubooquity/themes/
# && mv /config/addons_config/ubooquity/themes/plextheme-master/ /config/addons_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/addon_config/ubooquity/preferences.json | sponge /config/addon_config/ubooquity/preferences.json
jq --arg variable $CUSTOMUI '.theme = $variable' /config/addons_config/ubooquity/preferences.json | sponge /config/addons_config/ubooquity/preferences.json
fi