Apply beautysh changes

Apply beautysh changes
This commit is contained in:
Alexandre
2022-03-16 10:58:23 +01:00
committed by GitHub
146 changed files with 2017 additions and 2017 deletions

View File

@@ -4,5 +4,5 @@ CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
CONFIGSOURCE="$(dirname "${CONFIGSOURCE}")"
if [ -f "$CONFIGSOURCE"/script.sh ]; then
"$CONFIGSOURCE"./script.sh
"$CONFIGSOURCE"./script.sh
fi

View File

@@ -42,8 +42,8 @@ chmod -R 775 /config/addons_config/fireflyiii
bashio::log.info "Defining database"
case $(bashio::config 'DB_CONNECTION') in
# Use sqlite
sqlite_internal)
# Use sqlite
sqlite_internal)
bashio::log.info "Using built in sqlite"
# Set variable
@@ -74,8 +74,8 @@ sqlite_internal)
chown -R www-data:www-data /var/www/html/storage
;;
# Use MariaDB
mariadb_addon)
# Use MariaDB
mariadb_addon)
bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Detecting values..."
if ! bashio::services.available 'mysql'; then
bashio::log.fatal \
@@ -109,8 +109,8 @@ mariadb_addon)
-e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;"
;;
# Use remote
*)
# Use remote
*)
bashio::log.info "Using remote database. Requirement : filling all addon options fields, and making sure the database already exists"
for conditions in "DB_HOST" "DB_PORT" "DB_DATABASE" "DB_USERNAME" "DB_PASSWORD"; do
if ! bashio::config.has_value "$conditions"; then

View File

@@ -5,5 +5,5 @@ db=/config/addons_config/jellyfin/data/data/library.db
#Modify base
if [ -f $db ]; then
sqlite3 -quote ${db} "UPDATE 'TypedBaseItems' SET data = replace( data, '/config/jellyfin/', '/config/addons_config/jellyfin/' ), path = replace( path, '/config/jellyfin/', '/config/addons_config/jellyfin/' ) WHERE type='MediaBrowser.Controller.Entities.CollectionFolder';"
sqlite3 -quote ${db} "UPDATE 'TypedBaseItems' SET data = replace( data, '/config/jellyfin/', '/config/addons_config/jellyfin/' ), path = replace( path, '/config/jellyfin/', '/config/addons_config/jellyfin/' ) WHERE type='MediaBrowser.Controller.Entities.CollectionFolder';"
fi

View File

@@ -7,42 +7,42 @@ bashio::log.warning "Warning - minimum configuration recommended : 2 cpu cores a
# Check data location
LOCATION=$(bashio::config 'data_location')
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then
# Default location
LOCATION="/config/addons_config/joplin"
# Default location
LOCATION="/config/addons_config/joplin"
else
bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually"
bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually"
fi
# Create folder
if [ ! -d "$LOCATION" ]; then
# Create folder
if [ ! -d "$LOCATION" ]; then
echo "Creating $LOCATION"
mkdir -p "$LOCATION"
fi
fi
touch "$LOCATION"/database.sqlite
touch "$LOCATION"/database.sqlite
if [ ! -d "$LOCATION"/resources ]; then
if [ ! -d "$LOCATION"/resources ]; then
mkdir -p "$LOCATION"/resources
fi
ln -s "$LOCATION"/resources /home/joplin/packages/server
fi
ln -s "$LOCATION"/resources /home/joplin/packages/server
chown -R joplin:joplin "$LOCATION"
chmod -R 777 "$LOCATION"
chmod 777 "$LOCATION/database.sqlite"
export SQLITE_DATABASE="$LOCATION/database.sqlite"
chown -R joplin:joplin "$LOCATION"
chmod -R 777 "$LOCATION"
chmod 777 "$LOCATION/database.sqlite"
export SQLITE_DATABASE="$LOCATION/database.sqlite"
if bashio::config.has_value 'POSTGRES_DATABASE'; then
bashio::log.info "Using postgres"
bashio::log.info "Using postgres"
bashio::config.has_value 'DB_CLIENT' && export DB_CLIENT=$(bashio::config 'DB_CLIENT') && bashio::log.info 'Database client set'
bashio::config.has_value 'POSTGRES_PASSWORD' && export POSTGRES_PASSWORD=$(bashio::config 'POSTGRES_PASSWORD') && bashio::log.info 'Postgrep Password set'
bashio::config.has_value 'POSTGRES_DATABASE' && export POSTGRES_DATABASE=$(bashio::config 'POSTGRES_DATABASE') && bashio::log.info 'Postgrep Database set'
bashio::config.has_value 'POSTGRES_USER' && export POSTGRES_USER=$(bashio::config 'POSTGRES_USER') && bashio::log.info 'Postgrep User set'
bashio::config.has_value 'POSTGRES_PORT' && export POSTGRES_PORT=$(bashio::config 'POSTGRES_PORT') && bashio::log.info 'Postgrep Port set'
bashio::config.has_value 'POSTGRES_HOST' && export POSTGRES_HOST=$(bashio::config 'POSTGRES_HOST') && bashio::log.info 'Postgrep Host set'
bashio::config.has_value 'DB_CLIENT' && export DB_CLIENT=$(bashio::config 'DB_CLIENT') && bashio::log.info 'Database client set'
bashio::config.has_value 'POSTGRES_PASSWORD' && export POSTGRES_PASSWORD=$(bashio::config 'POSTGRES_PASSWORD') && bashio::log.info 'Postgrep Password set'
bashio::config.has_value 'POSTGRES_DATABASE' && export POSTGRES_DATABASE=$(bashio::config 'POSTGRES_DATABASE') && bashio::log.info 'Postgrep Database set'
bashio::config.has_value 'POSTGRES_USER' && export POSTGRES_USER=$(bashio::config 'POSTGRES_USER') && bashio::log.info 'Postgrep User set'
bashio::config.has_value 'POSTGRES_PORT' && export POSTGRES_PORT=$(bashio::config 'POSTGRES_PORT') && bashio::log.info 'Postgrep Port set'
bashio::config.has_value 'POSTGRES_HOST' && export POSTGRES_HOST=$(bashio::config 'POSTGRES_HOST') && bashio::log.info 'Postgrep Host set'
else
bashio::log.info "Using sqlite"
bashio::log.info "Using sqlite"
fi

View File

@@ -22,7 +22,7 @@ Brought to you by linuxserver.io
-------------------------------------'
if [[ -f /donate.txt ]]; then
echo '
To support the app dev(s) visit:'
To support the app dev(s) visit:'
cat /donate.txt
fi
echo '

View File

@@ -8,7 +8,7 @@ sed -i "s|%%datadirectory%%|$datadirectory|g" /defaults/config.php
# copy config
[[ ! -f /data/config/www/nextcloud/config/config.php ]] &&
cp /defaults/config.php /data/config/www/nextcloud/config/config.php
cp /defaults/config.php /data/config/www/nextcloud/config/config.php
# permissions
chown abc:abc \

View File

@@ -9,12 +9,12 @@ bashio::log.info "Defining database"
case $(bashio::config 'DB_TYPE') in
# Use sqlite
sqlite)
# Use sqlite
sqlite)
bashio::log.info "Using a local sqlite database"
;;
mariadb_addon)
mariadb_addon)
bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Discovering values..."
if ! bashio::services.available 'mysql'; then
bashio::log.fatal \

View File

@@ -27,6 +27,6 @@ bashio::var.json \
certfile "$(bashio::config 'certfile')" \
keyfile "$(bashio::config 'keyfile')" \
ssl "^$(bashio::config 'ssl')" |
tempio \
tempio \
-template /etc/nginx/templates/ingress.gtpl \
-out /etc/nginx/servers/ingress.conf

View File

@@ -39,7 +39,7 @@ LATEST_RELEASE=$(curl -f -s --retry 5 -L https://api.github.com/repos/wdaan/vuet
grep "browser_download_url.*zip" |
cut -d : -f 2,3 |
tr -d \" |
xargs)
xargs)
[ "$DEBUG" = "debug" ] && echo "Before curl"
curl -f -s -S -O -J -L "$LATEST_RELEASE"

View File

@@ -36,15 +36,15 @@ FREQUENCY=$(bashio::config 'Updates')
bashio::log.info "$FREQUENCY updates"
case $FREQUENCY in
"Hourly")
"Hourly")
sed -i -e '$a 0 * * * * /run.sh' /etc/crontabs/root
;;
"Daily")
"Daily")
sed -i -e '$a 0 0 * * * /run.sh' /etc/crontabs/root
;;
"Weekly")
"Weekly")
sed -i -e '$a 0 0 * * 0 /run.sh' /etc/crontabs/root
;;
esac

View File

@@ -42,15 +42,15 @@ FREQUENCY=$(bashio::config 'Updates')
bashio::log.info "$FREQUENCY updates"
case $FREQUENCY in
"Hourly")
"Hourly")
sed -i -e '$a 0 * * * * /run.sh' /etc/crontabs/root
;;
"Daily")
"Daily")
sed -i -e '$a 0 0 * * * /run.sh' /etc/crontabs/root
;;
"Weekly")
"Weekly")
sed -i -e '$a 0 0 * * 0 /run.sh' /etc/crontabs/root
;;
esac

View File

@@ -17,14 +17,14 @@ bashio::log.info "Defining database"
export DB_TYPE=$(bashio::config 'DB_TYPE')
case $(bashio::config 'DB_TYPE') in
# Use sqlite
sqlite)
# Use sqlite
sqlite)
bashio::log.info "Using a local sqlite database"
export DB_ENGINE="django.db.backends.sqlite3"
export POSTGRES_DB="/config/addons_config/tandoor_recipes/recipes.db"
;;
mariadb_addon)
mariadb_addon)
bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Discovering values..."
if ! bashio::services.available 'mysql'; then
bashio::log.fatal \
@@ -51,7 +51,7 @@ mariadb_addon)
bashio::log.warning "Uninstalling the MariaDB addon will remove any data"
;;
postgresql_external)
postgresql_external)
bashio::log.info "Using an external database, please populate all required fields in the addons config"
export DB_ENGINE=django.db.backends.postgresql
export POSTGRES_HOST=$(bashio::config "POSTGRES_HOST") && bashio::log.blue "POSTGRES_HOST=$POSTGRES_HOST"

View File

@@ -80,7 +80,7 @@ CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-host-whitelist-enabled\"=false")
CONFIG=$(bashio::jq "${CONFIG}" ".\"bind-address-ipv4\"=\"0.0.0.0\"")
echo "${CONFIG}" >"$CONFIGDIR"/settings.json &&
jq . -S "$CONFIGDIR"/settings.json | cat >temp.json && mv temp.json $CONFIGDIR/settings.json
jq . -S "$CONFIGDIR"/settings.json | cat >temp.json && mv temp.json $CONFIGDIR/settings.json
# USER and PASS
###############
@@ -99,7 +99,7 @@ CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-authentication-required\"=${BOOLEAN}")
CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-username\"=\"${USER}\"")
CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-password\"=\"${PASS}\"")
echo "${CONFIG}" >"$CONFIGDIR"/settings.json &&
jq . -S "$CONFIGDIR"/settings.json | cat >temp.json && mv temp.json "$CONFIGDIR"/settings.json
jq . -S "$CONFIGDIR"/settings.json | cat >temp.json && mv temp.json "$CONFIGDIR"/settings.json
# WHITELIST
###########
@@ -116,4 +116,4 @@ fi
CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-whitelist-enabled\"=${BOOLEAN}")
CONFIG=$(bashio::jq "${CONFIG}" ".\"rpc-whitelist\"=\"$WHITELIST\"")
echo "${CONFIG}" >"$CONFIGDIR"/settings.json &&
jq . -S "$CONFIGDIR"/settings.json | cat >temp.json && mv temp.json "$CONFIGDIR"/settings.json
jq . -S "$CONFIGDIR"/settings.json | cat >temp.json && mv temp.json "$CONFIGDIR"/settings.json

View File

@@ -9,10 +9,10 @@ PGID=$(bashio::config "PGID")
LOCATION=$(bashio::config 'data_location')
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then
# Default location
LOCATION="/share/webtop_kde"
# Default location
LOCATION="/share/webtop_kde"
else
bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually"
bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually"
# Check if config is located in an acceptable location
LOCATIONOK=""

View File

@@ -4,8 +4,8 @@
# Add Edge repositories
if bashio::config.true 'edge_repositories'; then
bashio::log.info "Changing app repositories to edge"
{ echo "https://dl-cdn.alpinelinux.org/alpine/edge/community";
bashio::log.info "Changing app repositories to edge"
{ echo "https://dl-cdn.alpinelinux.org/alpine/edge/community";
echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing";
echo "https://dl-cdn.alpinelinux.org/alpine/edge/main"; } > /etc/apk/repositories
fi

View File

@@ -18,12 +18,12 @@ bashio::log.info "Defining database"
export DB_TYPE=$(bashio::config 'DB_TYPE')
case $(bashio::config 'DB_TYPE') in
# Use sqlite
sqlite)
# Use sqlite
sqlite)
bashio::log.info "Using a local sqlite database $WEBTREES_HOME/$DB_NAME please wait then login. Default credentials : $WT_USER : $WT_PASS"
;;
mariadb_addon)
mariadb_addon)
bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Discovering values..."
if ! bashio::services.available 'mysql'; then
bashio::log.fatal \
@@ -45,7 +45,7 @@ mariadb_addon)
bashio::log.warning "Uninstalling the MariaDB addon will remove any data"
;;
external)
external)
bashio::log.info "Using an external database, please populate all required fields in the config.yaml according to dovumentation"
;;

View File

@@ -9,8 +9,8 @@
CONFIGSOURCE="/config/addons_config/zoneminder"
if [ ! -f "$CONFIGSOURCE"/zm.conf ]; then
# Copy conf files
cp /etc/zm/zm.conf "$CONFIGSOURCE"
# Copy conf files
cp /etc/zm/zm.conf "$CONFIGSOURCE"
fi
###################
@@ -20,8 +20,8 @@ fi
bashio::log.info "Defining database"
case "$(bashio::config "DB_CONNECTION")" in
# Use MariaDB
mariadb_addon)
# Use MariaDB
mariadb_addon)
bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Detecting values..."
if ! bashio::services.available 'mysql'; then
bashio::log.fatal \
@@ -56,8 +56,8 @@ mariadb_addon)
-e "CREATE DATABASE IF NOT EXISTS \`firefly\` ;"
;;
# Use remote
external)
# Use remote
external)
bashio::log.info "Using remote database. Requirement : filling all addon options fields, and making sure the database already exists"
for conditions in "ZM_DB_HOST" "ZM_DB_PORT" "ZM_DB_NAME" "ZM_DB_USER" "ZM_DB_PASS"; do
if ! bashio::config.has_value "$conditions"; then
@@ -67,8 +67,8 @@ external)
;;
# Use remote
*)
# Use remote
*)
bashio::log.info "Using internal database"
;;