mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-16 19:10:32 +02:00
Merge pull request #1906 from alexbelgium/create-pull-request/patch-1749549977 nobuild
Github bot: fix linting issues nobuild
This commit is contained in:
@@ -16,8 +16,7 @@ if ! bashio::supervisor.ping 2>/dev/null; then
|
||||
'-----------------------------------------------------------'
|
||||
# Use environment variables instead of addon options
|
||||
echo "... convert scripts to use environment variables instead of addon options"
|
||||
while IFS= read -r scripts
|
||||
do
|
||||
while IFS= read -r scripts; do
|
||||
sed -i -e 's/bashio::config.has_value[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"']/[ ! -z "${\1:-}" ]/g' \
|
||||
-e 's/bashio::config.true[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"']/[ ! -z "${\1:-}" ] \&\& [ "${\1:-}" = "true" ]/g' \
|
||||
-e 's/\$(bashio::config[[:space:]]*["'"'"']\([^"'"'"']*\)["'"'"'])/${\1:-}/g' \
|
||||
|
||||
@@ -99,10 +99,12 @@ if bashio::config.has_value 'localdisks'; then
|
||||
if [ -d /share/"$disk" ]; then dirpath="/share"; fi
|
||||
|
||||
# shellcheck disable=SC2015
|
||||
mount -t $type "$devpath"/"$disk" "$dirpath"/"$disk" -o $options && bashio::log.info "Success! $disk mounted to /mnt/$disk" || \
|
||||
(bashio::log.fatal "Unable to mount local drives! Please check the name."
|
||||
mount -t $type "$devpath"/"$disk" "$dirpath"/"$disk" -o $options && bashio::log.info "Success! $disk mounted to /mnt/$disk" ||
|
||||
(
|
||||
bashio::log.fatal "Unable to mount local drives! Please check the name."
|
||||
rmdir /mnt/"$disk"
|
||||
bashio::addon.stop)
|
||||
bashio::addon.stop
|
||||
)
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
@@ -53,8 +53,7 @@ if [ ! -f "${currentshebang%% *}" ]; then
|
||||
fi
|
||||
|
||||
# Check if there is actual commands
|
||||
while IFS= read -r line
|
||||
do
|
||||
while IFS= read -r line; do
|
||||
# Remove leading and trailing whitespaces
|
||||
line="$(echo "$line" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
|
||||
|
||||
|
||||
@@ -18,8 +18,7 @@ if bashio::config.has_value 'DNS_server'; then
|
||||
# shellcheck disable=SC2086
|
||||
for server in ${DNSSERVER//,/ }; do # Separate comma separated values
|
||||
# Only add DNS if successful
|
||||
if ping -c 1 "$server" &> /dev/null
|
||||
then
|
||||
if ping -c 1 "$server" &>/dev/null; then
|
||||
DNS="${DNS}nameserver $server\n"
|
||||
DNSLIST="$server $DNSLIST"
|
||||
else
|
||||
|
||||
@@ -86,7 +86,10 @@ if [ "$$" -eq 1 ]; then
|
||||
exit 0
|
||||
}
|
||||
trap terminate SIGTERM SIGINT
|
||||
while :; do sleep infinity & wait $!; done
|
||||
while :; do
|
||||
sleep infinity &
|
||||
wait $!
|
||||
done
|
||||
else
|
||||
echo " "
|
||||
echo -e "\033[0;32mStarting the upstream container\033[0m"
|
||||
|
||||
@@ -54,7 +54,7 @@ cd /data/"$BASENAME" || exit
|
||||
for f in */; do
|
||||
|
||||
if [ -f /data/"$BASENAME"/"$f"/updater.json ]; then
|
||||
SLUG=${f//\/}
|
||||
SLUG=${f//\//}
|
||||
|
||||
# Rebase
|
||||
LOGINFO="... updating ${REPOSITORY}" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||
@@ -64,7 +64,10 @@ for f in */; do
|
||||
|
||||
#Define the folder addon
|
||||
LOGINFO="... $SLUG : checking slug exists in repo" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||
cd /data/"${BASENAME}"/"${SLUG}" || { bashio::log.error "$SLUG addon not found in this repository. Exiting."; continue; }
|
||||
cd /data/"${BASENAME}"/"${SLUG}" || {
|
||||
bashio::log.error "$SLUG addon not found in this repository. Exiting."
|
||||
continue
|
||||
}
|
||||
|
||||
# Get variables
|
||||
UPSTREAM=$(jq -r .upstream_repo updater.json)
|
||||
@@ -87,12 +90,18 @@ for f in */; do
|
||||
fi
|
||||
|
||||
#Skip if paused
|
||||
if [[ "$PAUSED" = true ]]; then bashio::log.magenta "... $SLUG addon updates are paused, skipping"; continue; fi
|
||||
if [[ "$PAUSED" = true ]]; then
|
||||
bashio::log.magenta "... $SLUG addon updates are paused, skipping"
|
||||
continue
|
||||
fi
|
||||
|
||||
#Find current version
|
||||
LOGINFO="... $SLUG : get current version" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||
CURRENT=$(jq .upstream_version updater.json) || \
|
||||
{ bashio::log.error "$SLUG addon upstream tag not found in updater.json. Exiting."; continue; }
|
||||
CURRENT=$(jq .upstream_version updater.json) ||
|
||||
{
|
||||
bashio::log.error "$SLUG addon upstream tag not found in updater.json. Exiting."
|
||||
continue
|
||||
}
|
||||
|
||||
if [[ "$SOURCE" = dockerhub ]]; then
|
||||
# Use dockerhub as upstream
|
||||
@@ -126,7 +135,7 @@ for f in */; do
|
||||
tail -n 1
|
||||
)
|
||||
|
||||
[ "${BETA}" = true ] && \
|
||||
[ "${BETA}" = true ] &&
|
||||
LASTVERSION=$(
|
||||
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags?page_size=$LISTSIZE$FILTER_TEXT" |
|
||||
jq '.results | .[] | .name' -r |
|
||||
@@ -137,8 +146,9 @@ for f in */; do
|
||||
tail -n 1
|
||||
)
|
||||
|
||||
[ "${BYDATE}" = true ] && \
|
||||
LASTVERSION=$(curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags?page_size=${LISTSIZE}&ordering=last_updated$FILTER_TEXT" |
|
||||
[ "${BYDATE}" = true ] &&
|
||||
LASTVERSION=$(
|
||||
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags?page_size=${LISTSIZE}&ordering=last_updated$FILTER_TEXT" |
|
||||
jq '.results | .[] | .name' -r |
|
||||
sed -e '/.*latest.*/d' |
|
||||
sed -e '/.*dev.*/d' |
|
||||
@@ -146,11 +156,12 @@ for f in */; do
|
||||
sed -e "/.*$EXCLUDE_TEXT.*/d" |
|
||||
sort -V |
|
||||
tail -n 1
|
||||
) && \
|
||||
DATE=$(curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags/?page_size=${LISTSIZE}&ordering=last_updated$FILTER_TEXT" |
|
||||
) &&
|
||||
DATE=$(
|
||||
curl -f -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags/?page_size=${LISTSIZE}&ordering=last_updated$FILTER_TEXT" |
|
||||
jq '.results[] | select(.name==$LASTVERSION) | .last_updated' -r --arg LASTVERSION "$LASTVERSION"
|
||||
) && \
|
||||
DATE="${DATE%T*}" && \
|
||||
) &&
|
||||
DATE="${DATE%T*}" &&
|
||||
LASTVERSION="$LASTVERSION-$DATE"
|
||||
LOGINFO="... $SLUG : bydate is true, version is $LASTVERSION" && if [ "$VERBOSE" = true ]; then bashio::log.info "$LOGINFO"; fi
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ set -e
|
||||
# Set UrlBase
|
||||
|
||||
bashio::log.info "Starting NGinx..."
|
||||
nginx & true
|
||||
nginx &
|
||||
true
|
||||
|
||||
#############
|
||||
# Start app #
|
||||
|
||||
@@ -8,6 +8,6 @@ chown -R nginx:nginx /data
|
||||
|
||||
# Start app
|
||||
# Find the PHP FPM service script and start it
|
||||
find /etc/init.d -type f -name "php*-fpm" -exec {} start \; && \
|
||||
chown -R nginx:nginx /data/Specific && \
|
||||
find /etc/init.d -type f -name "php*-fpm" -exec {} start \; &&
|
||||
chown -R nginx:nginx /data/Specific &&
|
||||
nginx -g "daemon off;"
|
||||
|
||||
@@ -14,4 +14,3 @@ ingress_entry=$(bashio::addon.ingress_entry)
|
||||
sed -i "s/%%port%%/${ingress_port}/g" /etc/nginx/servers/ingress.conf
|
||||
sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf
|
||||
sed -i "s|%%ingress_entry%%|${ingress_entry}|g" /etc/nginx/servers/ingress.conf
|
||||
|
||||
|
||||
@@ -9,24 +9,28 @@ set -e
|
||||
##################
|
||||
# Starting redis #
|
||||
##################
|
||||
exec redis-server & bashio::log.info "Starting redis"
|
||||
exec redis-server &
|
||||
bashio::log.info "Starting redis"
|
||||
|
||||
####################
|
||||
# Starting mongodb #
|
||||
####################
|
||||
mkdir -p /data/db
|
||||
exec mongod --bind_ip 127.0.0.1 & bashio::log.info "Starting mongod"
|
||||
exec mongod --bind_ip 127.0.0.1 &
|
||||
bashio::log.info "Starting mongod"
|
||||
|
||||
################
|
||||
# Starting app #
|
||||
################
|
||||
cd /srv || true
|
||||
npm start docker-entrypoint.sh & bashio::log.info "Starting binance bot"
|
||||
npm start docker-entrypoint.sh &
|
||||
bashio::log.info "Starting binance bot"
|
||||
|
||||
#########################
|
||||
# Starting Trading View #
|
||||
#########################
|
||||
python main.py & bashio::log.info "Starting trading view"
|
||||
python main.py &
|
||||
bashio::log.info "Starting trading view"
|
||||
|
||||
##################
|
||||
# Starting nginx #
|
||||
|
||||
@@ -12,4 +12,3 @@ if bashio::services.available 'mqtt'; then
|
||||
bashio::log.blue "MQTT broker : tcp://$(bashio::services "mqtt" "host"):$(bashio::services "mqtt" "port")"
|
||||
bashio::log.green "---"
|
||||
fi
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@ fi
|
||||
|
||||
bashio::log.info "Starting app..."
|
||||
# shellcheck disable=SC2086
|
||||
/usr/bin/entrypoint.sh birdnet-go realtime & true
|
||||
/usr/bin/entrypoint.sh birdnet-go realtime &
|
||||
true
|
||||
|
||||
# Wait for app to become available to start nginx
|
||||
bashio::net.wait_for 8080 localhost 900
|
||||
bashio::log.info "Starting NGinx..."
|
||||
exec nginx
|
||||
|
||||
|
||||
@@ -35,7 +35,10 @@ touch "$ANALYZING_NOW_FILE"
|
||||
BIRDSONGS_DIR="$(readlink -f "$HOME/BirdSongs/Extracted/By_Date")"
|
||||
|
||||
# Ensure directories and set permissions
|
||||
mkdir -p "$INGEST_DIR" || { log_red "Failed to create directory: $INGEST_DIR"; exit 1; }
|
||||
mkdir -p "$INGEST_DIR" || {
|
||||
log_red "Failed to create directory: $INGEST_DIR"
|
||||
exit 1
|
||||
}
|
||||
chown -R pi:pi "$INGEST_DIR" || log_yellow "Could not change ownership for $INGEST_DIR"
|
||||
chmod -R 755 "$INGEST_DIR" || log_yellow "Could not set permissions for $INGEST_DIR"
|
||||
|
||||
|
||||
@@ -121,4 +121,3 @@ echo "... setting up Matplotlabdir"
|
||||
mkdir -p "$HOME"/.cache/matplotlib
|
||||
chown -R "pi:pi" "$HOME"/.cache/matplotlib
|
||||
chmod 777 "$HOME"/.cache/matplotlib
|
||||
|
||||
|
||||
@@ -47,4 +47,3 @@ if bashio::config.true 'ssl'; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
@@ -13,4 +13,3 @@ if [ -d /homeassistant/addons_config/calibre-web ] && [ ! -L /homeassistant/addo
|
||||
fi
|
||||
rm -r /homeassistant/addons_config/calibre-web
|
||||
fi
|
||||
|
||||
|
||||
@@ -60,7 +60,8 @@ bashio::log.warning "Default password admin:admin..."
|
||||
bashio::log.info "Starting..."
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
/./usr/local/bin/codex & true
|
||||
/./usr/local/bin/codex &
|
||||
true
|
||||
|
||||
bashio::net.wait_for 9810 localhost 900 || true
|
||||
bashio::log.info "Started !"
|
||||
|
||||
@@ -102,7 +102,8 @@ fi
|
||||
# Launch App #
|
||||
##############
|
||||
echo " "
|
||||
nginx & bashio::log.info "Starting nginx"
|
||||
nginx &
|
||||
bashio::log.info "Starting nginx"
|
||||
echo " "
|
||||
bashio::log.info "Starting the app"
|
||||
echo " "
|
||||
|
||||
@@ -102,7 +102,8 @@ fi
|
||||
# Launch App #
|
||||
##############
|
||||
echo " "
|
||||
nginx & bashio::log.info "Starting nginx"
|
||||
nginx &
|
||||
bashio::log.info "Starting nginx"
|
||||
echo " "
|
||||
bashio::log.info "Starting the app"
|
||||
echo " "
|
||||
|
||||
@@ -148,7 +148,10 @@ chmod -R 775 /config/addons_config/fireflyiii
|
||||
|
||||
# Test
|
||||
f=/config/addons_config/fireflyiii
|
||||
while [[ $f != / ]]; do chmod 777 "$f"; f=$(dirname "$f"); done;
|
||||
while [[ $f != / ]]; do
|
||||
chmod 777 "$f"
|
||||
f=$(dirname "$f")
|
||||
done
|
||||
|
||||
################
|
||||
# CRON OPTIONS #
|
||||
|
||||
@@ -28,8 +28,7 @@ if bashio::config.has_value 'Updates'; then
|
||||
bashio::log.info "$FREQUENCY updates"
|
||||
echo ""
|
||||
|
||||
for i in $(seq 4 2 12)
|
||||
do
|
||||
for i in $(seq 4 2 12); do
|
||||
hour=" $i"
|
||||
freqDir="/etc/periodic/daily$i"
|
||||
echo "0 ${hour:(-4)} * * * run-parts \"$freqDir\"" >>/etc/crontabs/root
|
||||
|
||||
@@ -26,7 +26,6 @@ if bashio::config.true 'ssl'; then
|
||||
[ ! -f /ssl/"$certfile" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$certfile not found" && bashio::exit.nok
|
||||
[ ! -f /ssl/"$keyfile" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$keyfile not found" && bashio::exit.nok
|
||||
|
||||
|
||||
sed -i "s|default_server|ssl|g" /etc/nginx/servers/ssl.conf
|
||||
sed -i "/proxy_params.conf/a ssl_certificate /ssl/$certfile;" /etc/nginx/servers/ssl.conf
|
||||
sed -i "/proxy_params.conf/a ssl_certificate_key /ssl/$keyfile;" /etc/nginx/servers/ssl.conf
|
||||
|
||||
@@ -73,7 +73,8 @@ CELERY_PID=$!
|
||||
# Staring nginx #
|
||||
#################
|
||||
echo "Starting nginx..."
|
||||
exec nginx & bashio::log.info "Starting nginx"
|
||||
exec nginx &
|
||||
bashio::log.info "Starting nginx"
|
||||
NGINX_PID=$!
|
||||
|
||||
# Wait for all background processes
|
||||
|
||||
@@ -92,4 +92,3 @@ echo "Enable legacy mode"
|
||||
mkdir -p /config/addons_config
|
||||
ln -sf "$LOCATION" /config/addons_config/jellyfin
|
||||
chown -R "$PUID:$PGID" "$LOCATION"
|
||||
|
||||
|
||||
@@ -101,7 +101,10 @@ APP_KEY=$(bashio::config "APP_KEY")
|
||||
|
||||
# Check if APP_KEY is not 32 characters long
|
||||
if [ -z "$APP_KEY" ] || [ ${#APP_KEY} -lt 32 ]; then
|
||||
APP_KEY="$(echo -n 'base64:'; openssl rand -base64 32)"
|
||||
APP_KEY="$(
|
||||
echo -n 'base64:'
|
||||
openssl rand -base64 32
|
||||
)"
|
||||
bashio::addon.option "APP_KEY" "${APP_KEY}"
|
||||
bashio::log.warning "The APP_KEY set was invalid, generated a random one: ${APP_KEY}. Restarting to take it into account"
|
||||
echo "${APP_KEY}" >>/config/APP_KEY
|
||||
|
||||
@@ -65,7 +65,6 @@ if bashio::config.has_value 'welcome_message'; then
|
||||
export ND_UIWELCOMEMESSAGE
|
||||
fi
|
||||
|
||||
|
||||
##############
|
||||
# LAUNCH APP #
|
||||
##############
|
||||
|
||||
@@ -70,10 +70,10 @@ execute_main_logic() {
|
||||
NEW_SCAN_SUBNETS="${SCAN_SUBNETS%]}, '${local_ip}/24 --interface=${interface}']"
|
||||
sed -i "/^SCAN_SUBNETS/c\\$NEW_SCAN_SUBNETS" "$config_file"
|
||||
# Check availability of hosts
|
||||
VALUE="$(arp-scan --interface="$interface" "${local_ip}/24" 2>/dev/null \
|
||||
| grep "responded" \
|
||||
| awk -F'.' '{print $NF}' \
|
||||
| awk '{print $1}' || true)"
|
||||
VALUE="$(arp-scan --interface="$interface" "${local_ip}/24" 2>/dev/null |
|
||||
grep "responded" |
|
||||
awk -F'.' '{print $NF}' |
|
||||
awk '{print $1}' || true)"
|
||||
echo "... $interface is available in Home Assistant (with $VALUE devices), added to app.conf"
|
||||
fi
|
||||
fi
|
||||
@@ -96,5 +96,6 @@ wait_for_config_file() {
|
||||
if [ -f "$config_file" ]; then
|
||||
execute_main_logic
|
||||
else
|
||||
wait_for_config_file & true
|
||||
wait_for_config_file &
|
||||
true
|
||||
fi
|
||||
|
||||
@@ -25,8 +25,7 @@ if bashio::config.has_value 'additional_apps'; then
|
||||
re='^( *).*'
|
||||
read -ra array <<<"$NEWAPPS"
|
||||
IFS=$OIFS
|
||||
for element in "${array[@]}"
|
||||
do
|
||||
for element in "${array[@]}"; do
|
||||
if [[ $element =~ $re ]]; then
|
||||
# shellcheck disable=SC2295
|
||||
APP="${element#${BASH_REMATCH[1]}}"
|
||||
|
||||
@@ -26,7 +26,6 @@ if bashio::config.true 'ssl'; then
|
||||
[ ! -f /ssl/"$certfile" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$certfile not found" && bashio::exit.nok
|
||||
[ ! -f /ssl/"$keyfile" ] && bashio::log.fatal "... use_own_certs is true but certificate /ssl/$keyfile not found" && bashio::exit.nok
|
||||
|
||||
|
||||
sed -i "s|default_server|ssl|g" /etc/nginx/servers/ssl.conf
|
||||
sed -i "/proxy_params.conf/a ssl_certificate /ssl/$certfile;" /etc/nginx/servers/ssl.conf
|
||||
sed -i "/proxy_params.conf/a ssl_certificate_key /ssl/$keyfile;" /etc/nginx/servers/ssl.conf
|
||||
|
||||
@@ -34,15 +34,15 @@ case $(bashio::config 'DB_TYPE') in
|
||||
PHOTOPRISM_DATABASE_NAME="photoprism"
|
||||
PHOTOPRISM_DATABASE_USER="$(bashio::services 'mysql' 'username')"
|
||||
PHOTOPRISM_DATABASE_PASSWORD="$(bashio::services 'mysql' 'password')"
|
||||
export PHOTOPRISM_DATABASE_DRIVER && \
|
||||
export PHOTOPRISM_DATABASE_DRIVER &&
|
||||
bashio::log.blue "PHOTOPRISM_DATABASE_DRIVER=$PHOTOPRISM_DATABASE_DRIVER"
|
||||
export PHOTOPRISM_DATABASE_SERVER && \
|
||||
export PHOTOPRISM_DATABASE_SERVER &&
|
||||
bashio::log.blue "PHOTOPRISM_DATABASE_SERVER=$PHOTOPRISM_DATABASE_SERVER"
|
||||
export PHOTOPRISM_DATABASE_NAME && \
|
||||
export PHOTOPRISM_DATABASE_NAME &&
|
||||
bashio::log.blue "PHOTOPRISM_DATABASE_NAME=$PHOTOPRISM_DATABASE_NAME"
|
||||
export PHOTOPRISM_DATABASE_USER && \
|
||||
export PHOTOPRISM_DATABASE_USER &&
|
||||
bashio::log.blue "PHOTOPRISM_DATABASE_USER=$PHOTOPRISM_DATABASE_USER"
|
||||
export PHOTOPRISM_DATABASE_PASSWORD && \
|
||||
export PHOTOPRISM_DATABASE_PASSWORD &&
|
||||
bashio::log.blue "PHOTOPRISM_DATABASE_PASSWORD=$PHOTOPRISM_DATABASE_PASSWORD"
|
||||
|
||||
{
|
||||
@@ -138,7 +138,8 @@ bashio::log.info "Please wait 1 or 2 minutes to allow the server to load"
|
||||
bashio::log.info 'Default username : admin, default password: "please_change_password"'
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. /scripts/entrypoint.sh photoprism start & bashio::log.info "Starting, please wait for next green text..."
|
||||
. /scripts/entrypoint.sh photoprism start &
|
||||
bashio::log.info "Starting, please wait for next green text..."
|
||||
|
||||
bashio::net.wait_for 2341 localhost 900
|
||||
bashio::log.info "App launched"
|
||||
|
||||
@@ -94,8 +94,8 @@ drop_vectors_everywhere() {
|
||||
\"SELECT datname FROM pg_database WHERE datistemplate = false AND datallowconn\""); do
|
||||
if su - postgres -c \
|
||||
"$BINARIES_DIR/$old_pgver/bin/psql -d $db -Atc \
|
||||
\"SELECT 1 FROM pg_extension WHERE extname='vectors'\"" \
|
||||
| grep -q 1; then
|
||||
\"SELECT 1 FROM pg_extension WHERE extname='vectors'\"" |
|
||||
grep -q 1; then
|
||||
bashio::log.warning "Dropping extension vectors from DB $db"
|
||||
su - postgres -c \
|
||||
"$BINARIES_DIR/$old_pgver/bin/psql -d $db -c \
|
||||
@@ -109,10 +109,12 @@ start_postgres() {
|
||||
bashio::log.info "Starting PostgreSQL..."
|
||||
if [ "$(bashio::info.arch)" = "armv7" ]; then
|
||||
bashio::log.warning "ARMv7 detected: Starting without vectors.so"
|
||||
/usr/local/bin/immich-docker-entrypoint.sh postgres & true
|
||||
/usr/local/bin/immich-docker-entrypoint.sh postgres &
|
||||
true
|
||||
exit 0
|
||||
else
|
||||
/usr/local/bin/immich-docker-entrypoint.sh postgres -c config_file=/etc/postgresql/postgresql.conf & true
|
||||
/usr/local/bin/immich-docker-entrypoint.sh postgres -c config_file=/etc/postgresql/postgresql.conf &
|
||||
true
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ if bashio::config.has_value 'SavePath'; then
|
||||
-e "/\[BitTorrent\]/a Downloads\\\DefaultSavePath=$DOWNLOADS" \
|
||||
-e "/\[BitTorrent\]/a Session\\\DefaultSavePath=$DOWNLOADS" qBittorrent.conf
|
||||
|
||||
|
||||
# Info
|
||||
bashio::log.info "Downloads can be found in $DOWNLOADS"
|
||||
fi
|
||||
|
||||
@@ -34,7 +34,8 @@ if bashio::config.true "qbit_manage"; then
|
||||
sed -i "/directory:/a\ root_dir: \"$(bashio::config 'SavePath')\"" /config/qbit_manage/qbit_manage.yml
|
||||
|
||||
# Startup delay 30s ; config file specific ; log file specific
|
||||
python /qbit_manage/qbit_manage.py -sd 30 --config-file "/config/qbit_manage/qbit_manage.yml" --log-file "/config/qbit_manage/qbit_manage.log" & true
|
||||
python /qbit_manage/qbit_manage.py -sd 30 --config-file "/config/qbit_manage/qbit_manage.yml" --log-file "/config/qbit_manage/qbit_manage.log" &
|
||||
true
|
||||
bashio::log.info "qbit_manage started with config in /addon_configs/$HOSTNAME/qbit_manage/qbit_manage.yaml accessible with the Filebrowser addon"
|
||||
|
||||
fi
|
||||
|
||||
@@ -27,14 +27,14 @@ if bashio::config.has_value 'customUI' && [ ! "$CUSTOMUI" = default ] && [ ! "$C
|
||||
"transmission-web-control")
|
||||
### Install WebUI
|
||||
mkdir -p /transmission-web-control
|
||||
curl -sL "$(curl -s https://api.github.com/repos/ronggang/transmission-web-control/releases/latest | jq --raw-output '.tarball_url')" | tar -C /transmission-web-control/ --strip-components=2 -xz \
|
||||
curl -sL "$(curl -s https://api.github.com/repos/ronggang/transmission-web-control/releases/latest | jq --raw-output '.tarball_url')" | tar -C /transmission-web-control/ --strip-components=2 -xz
|
||||
# Enables the original UI button in transmission-web-control
|
||||
ln -s /usr/share/transmission/public_html/* /transmission-web-control/ 2>/dev/null || true
|
||||
ln -s /usr/share/transmission/public_html/index.html /transmission-web-control/index.original.html
|
||||
;;
|
||||
|
||||
"kettu")
|
||||
mkdir -p /kettu && \
|
||||
mkdir -p /kettu &&
|
||||
curl -o /tmp/kettu.tar.gz -L "https://github.com/endor/kettu/archive/master.tar.gz"
|
||||
tar xf /tmp/kettu.tar.gz -C /kettu --strip-components=1
|
||||
;;
|
||||
@@ -46,17 +46,17 @@ if bashio::config.has_value 'customUI' && [ ! "$CUSTOMUI" = default ] && [ ! "$C
|
||||
|
||||
"transmissionic")
|
||||
TRANSMISSIONIC_VERSION=$(curl -s -L "https://api.github.com/repos/6c65726f79/Transmissionic/releases/latest" | jq -r .tag_name)
|
||||
echo "**** grab transmissionic ****" && \
|
||||
if [ -z "${TRANSMISSIONIC_VERSION+x}" ]; then \
|
||||
TRANSMISSIONIC_VERSION="$(curl -s "https://api.github.com/repos/6c65726f79/Transmissionic/releases/latest" \
|
||||
| jq -rc ".tag_name")"; \
|
||||
fi && \
|
||||
echo "**** grab transmissionic ****" &&
|
||||
if [ -z "${TRANSMISSIONIC_VERSION+x}" ]; then
|
||||
TRANSMISSIONIC_VERSION="$(curl -s "https://api.github.com/repos/6c65726f79/Transmissionic/releases/latest" |
|
||||
jq -rc ".tag_name")"
|
||||
fi &&
|
||||
curl -o \
|
||||
/tmp/transmissionic.zip -L \
|
||||
"https://github.com/6c65726f79/Transmissionic/releases/download/${TRANSMISSIONIC_VERSION}/Transmissionic-webui-${TRANSMISSIONIC_VERSION}.zip" && \
|
||||
"https://github.com/6c65726f79/Transmissionic/releases/download/${TRANSMISSIONIC_VERSION}/Transmissionic-webui-${TRANSMISSIONIC_VERSION}.zip" &&
|
||||
unzip \
|
||||
/tmp/transmissionic.zip -d \
|
||||
/themes && \
|
||||
/themes &&
|
||||
mv /themes/web /transmissionic
|
||||
;;
|
||||
|
||||
|
||||
@@ -86,8 +86,7 @@ function check_path () {
|
||||
cp "$file" /tmpfile
|
||||
|
||||
# Loop through each line of the input file
|
||||
while read -r line
|
||||
do
|
||||
while read -r line; do
|
||||
# Check if the line contains a txt file
|
||||
if [[ "$line" =~ \.txt ]] || [[ "$line" =~ \.crt ]]; then
|
||||
# Extract the txt file name from the line
|
||||
@@ -171,7 +170,10 @@ ip route add 172.30.0.0/16 via 172.30.32.1
|
||||
if bashio::config.true 'auto_restart'; then
|
||||
|
||||
bashio::log.info "Auto restarting addon if openvpn down"
|
||||
(set -o posix; export -p) > /env.sh
|
||||
(
|
||||
set -o posix
|
||||
export -p
|
||||
) >/env.sh
|
||||
chmod 777 /env.sh
|
||||
chmod +x /usr/bin/restart_addon
|
||||
sed -i "1a . /env.sh; /usr/bin/restart_addon >/proc/1/fd/1 2>/proc/1/fd/2" /etc/openvpn/tunnelDown.sh
|
||||
@@ -201,7 +203,8 @@ if [ "$(bashio::config "OPENVPN_PROVIDER")" == "mullvad" ]; then
|
||||
fi
|
||||
|
||||
bashio::log.info "Starting app"
|
||||
/./etc/openvpn/start.sh & echo ""
|
||||
/./etc/openvpn/start.sh &
|
||||
echo ""
|
||||
|
||||
#################
|
||||
# Allow ingress #
|
||||
|
||||
@@ -55,9 +55,9 @@ if bashio::config.true 'install_ms_edge'; then
|
||||
apt-get update
|
||||
echo "**** install edge ****"
|
||||
apt-get install --no-install-recommends -y ca-certificates
|
||||
if [ -z ${EDGE_VERSION+x} ]; then \
|
||||
EDGE_VERSION=$(curl -sL https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/ | \
|
||||
awk -F'(<a href="microsoft-edge-stable_|_amd64.deb\")' '/href=/ {print $2}' | sort --version-sort | tail -1); \
|
||||
if [ -z ${EDGE_VERSION+x} ]; then
|
||||
EDGE_VERSION=$(curl -sL https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/ |
|
||||
awk -F'(<a href="microsoft-edge-stable_|_amd64.deb\")' '/href=/ {print $2}' | sort --version-sort | tail -1)
|
||||
fi
|
||||
curl -o /tmp/edge.deb -L "https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-stable/microsoft-edge-stable_${EDGE_VERSION}_amd64.deb"
|
||||
dpkg -I /tmp/edge.deb
|
||||
|
||||
@@ -29,10 +29,14 @@ ln -s /data/media /home/wger
|
||||
#####################
|
||||
# Align permissions #
|
||||
#####################
|
||||
(set -o posix; export -p) > /data/env.sh
|
||||
(
|
||||
set -o posix
|
||||
export -p
|
||||
) >/data/env.sh
|
||||
chown -R 1000:1000 /data
|
||||
chown -R 1000:1000 /home/wger
|
||||
chmod -R 777 /data
|
||||
|
||||
bashio::log.info "Starting nginx"
|
||||
nginx || true & true
|
||||
nginx || true &
|
||||
true
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec misc/tor/start-tor.sh & ./run & echo "Starting NGinx..."
|
||||
exec misc/tor/start-tor.sh &
|
||||
./run &
|
||||
echo "Starting NGinx..."
|
||||
|
||||
exec nginx
|
||||
|
||||
@@ -67,7 +67,6 @@ case "$(bashio::config "DB_CONNECTION")" in
|
||||
done
|
||||
;;
|
||||
|
||||
|
||||
# Use remote
|
||||
*)
|
||||
bashio::log.info "Using internal database"
|
||||
|
||||
@@ -69,7 +69,6 @@ case "$(bashio::config 'database')" in
|
||||
bashio::log.warning "Uninstalling the MariaDB addon will remove any data"
|
||||
;;
|
||||
|
||||
|
||||
# Use sqlite
|
||||
*)
|
||||
bashio::log.info "Using sqlite as database driver"
|
||||
@@ -110,12 +109,14 @@ done
|
||||
#################
|
||||
# Staring redis #
|
||||
#################
|
||||
exec redis-server & bashio::log.info "Starting redis"
|
||||
exec redis-server &
|
||||
bashio::log.info "Starting redis"
|
||||
|
||||
#################
|
||||
# Staring nginx #
|
||||
#################
|
||||
exec nginx & bashio::log.info "Starting nginx"
|
||||
exec nginx &
|
||||
bashio::log.info "Starting nginx"
|
||||
|
||||
###############
|
||||
# Starting app #
|
||||
|
||||
Reference in New Issue
Block a user