mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-09 17:31:03 +01:00
hadolint
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Displays a simple add-on banner on startup
|
||||
# ==============================================================================
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
###################################
|
||||
# Export all addon options as env #
|
||||
@@ -16,7 +17,7 @@ for KEYS in ${arr[@]}; do
|
||||
line="${KEYS}=${VALUE//[\"\']/}"
|
||||
# Use locally
|
||||
if ! bashio::config.false "verbose"; then bashio::log.blue "$line"; fi
|
||||
# Export the variable to run scripts
|
||||
# Export the variable to run scripts
|
||||
line="${KEYS}=${VALUE//[\"\']/} 2>/dev/null || true"
|
||||
[ -f /etc/services.d/*/*run* ] && sed -i "1a export $line" /etc/services.d/*/*run* 2>/dev/null
|
||||
[ -f /etc/cont-init.d/*run* ] && sed -i "1a export $line" /etc/cont-init.d/*run* 2>/dev/null
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
JSONTOCHECK='/config/transmission/settings.json'
|
||||
JSONSOURCE='/defaults/settings.json'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
##################
|
||||
# INITIALIZATION #
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
###############
|
||||
# DNS SETTING #
|
||||
@@ -7,22 +8,21 @@
|
||||
# Avoid usage of local dns such as adguard home or pihole\n"
|
||||
|
||||
if bashio::config.has_value 'DNS_server'; then
|
||||
# Define variables
|
||||
DNSSERVER=$(bashio::config 'DNS_server')
|
||||
DNS=""
|
||||
DNSLIST=""
|
||||
# Define variables
|
||||
DNSSERVER=$(bashio::config 'DNS_server')
|
||||
DNS=""
|
||||
DNSLIST=""
|
||||
|
||||
# Get DNS servers
|
||||
for server in ${DNSSERVER//,/ } # Separate comma separated values
|
||||
do
|
||||
DNS="${DNS}nameserver $server\n"
|
||||
DNSLIST="$server $DNSLIST"
|
||||
done
|
||||
# Get DNS servers
|
||||
for server in ${DNSSERVER//,/ }; do # Separate comma separated values
|
||||
DNS="${DNS}nameserver $server\n"
|
||||
DNSLIST="$server $DNSLIST"
|
||||
done
|
||||
|
||||
# Write resolv.conf
|
||||
printf "${DNS}" > /etc/resolv.conf
|
||||
chmod 644 /etc/resolv.conf
|
||||
bashio::log.info "DNS SERVERS set to $DNSLIST"
|
||||
# Write resolv.conf
|
||||
printf "${DNS}" >/etc/resolv.conf
|
||||
chmod 644 /etc/resolv.conf
|
||||
bashio::log.info "DNS SERVERS set to $DNSLIST"
|
||||
else
|
||||
bashio::log.info "DNS Servers option empty. Using default router (or HA) dns servers."
|
||||
bashio::log.info "DNS Servers option empty. Using default router (or HA) dns servers."
|
||||
fi
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
###############
|
||||
# SILENT MODE #
|
||||
###############
|
||||
|
||||
if bashio::config.true 'silent'; then
|
||||
APPEND=' > /dev/null'
|
||||
[ -f /etc/services.d/*/run ] && sed -i '$s|$|'"$APPEND"'|' /etc/services.d/*/run
|
||||
[ -f /etc/cont-init.d/*/*run* ] && sed -i '$s|$|'"$APPEND"'|' /etc/cont-init.d/*/*run*
|
||||
bashio::log.info 'Silent mode activated, all logs from emby server are hidden. Disable this option if you need to troubleshoot the addon.'
|
||||
APPEND=' > /dev/null'
|
||||
[ -f /etc/services.d/*/run ] && sed -i '$s|$|'"$APPEND"'|' /etc/services.d/*/run
|
||||
[ -f /etc/cont-init.d/*/*run* ] && sed -i '$s|$|'"$APPEND"'|' /etc/cont-init.d/*/*run*
|
||||
bashio::log.info 'Silent mode activated, all logs from emby server are hidden. Disable this option if you need to troubleshoot the addon.'
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
######################
|
||||
# MOUNT LOCAL SHARES #
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#########################
|
||||
# MOUNT SMB SHARES v1.6 #
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
##########
|
||||
# UPDATE #
|
||||
@@ -65,22 +66,22 @@ for addons in $(bashio::config "addon|keys"); do
|
||||
DOCKERHUB_REPO=$(echo "${UPSTREAM%%/*}")
|
||||
DOCKERHUB_IMAGE=$(echo $UPSTREAM | cut -d "/" -f2)
|
||||
LASTVERSION=$(
|
||||
curl -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags/?page_size=1000" | \
|
||||
jq '.results | .[] | .name' -r | \
|
||||
sed -e '/.*latest.*/d' | \
|
||||
sed -e '/.*dev.*/d' | \
|
||||
sort -V | \
|
||||
tail -n 1
|
||||
curl -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags/?page_size=1000" |
|
||||
jq '.results | .[] | .name' -r |
|
||||
sed -e '/.*latest.*/d' |
|
||||
sed -e '/.*dev.*/d' |
|
||||
sort -V |
|
||||
tail -n 1
|
||||
)
|
||||
[ ${BETA} = true ] && \
|
||||
LASTVERSION=$(
|
||||
curl -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags/?page_size=1000" | \
|
||||
jq '.results | .[] | .name' -r | \
|
||||
sed -e '/.*latest.*/d' | \
|
||||
sed -e '/.*dev.*/!d' | \
|
||||
sort -V | \
|
||||
tail -n 1
|
||||
)
|
||||
[ ${BETA} = true ] &&
|
||||
LASTVERSION=$(
|
||||
curl -L -s --fail "https://hub.docker.com/v2/repositories/${DOCKERHUB_REPO}/${DOCKERHUB_IMAGE}/tags/?page_size=1000" |
|
||||
jq '.results | .[] | .name' -r |
|
||||
sed -e '/.*latest.*/d' |
|
||||
sed -e '/.*dev.*/!d' |
|
||||
sort -V |
|
||||
tail -n 1
|
||||
)
|
||||
|
||||
else
|
||||
# Use github as upstream
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Bitwarden
|
||||
# This file configures nginx
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Bitwarden
|
||||
# Runs the Vaultwarden server
|
||||
@@ -20,24 +21,24 @@ export ROCKET_SECRET_KEY="${secret_key}"
|
||||
# Find the matching log level
|
||||
if bashio::config.has_value 'log_level'; then
|
||||
case "$(bashio::string.lower "$(bashio::config 'log_level')")" in
|
||||
all|trace)
|
||||
log_level="trace"
|
||||
;;
|
||||
debug)
|
||||
log_level="debug"
|
||||
;;
|
||||
info|notice)
|
||||
log_level="info"
|
||||
;;
|
||||
warning)
|
||||
log_level="warn"
|
||||
;;
|
||||
error|fatal)
|
||||
log_level="error"
|
||||
;;
|
||||
off)
|
||||
log_level="off"
|
||||
;;
|
||||
all | trace)
|
||||
log_level="trace"
|
||||
;;
|
||||
debug)
|
||||
log_level="debug"
|
||||
;;
|
||||
info | notice)
|
||||
log_level="info"
|
||||
;;
|
||||
warning)
|
||||
log_level="warn"
|
||||
;;
|
||||
error | fatal)
|
||||
log_level="error"
|
||||
;;
|
||||
off)
|
||||
log_level="off"
|
||||
;;
|
||||
esac
|
||||
|
||||
export LOG_LEVEL="${log_level}"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Bitwarden
|
||||
# Runs the Nginx daemon
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
###############
|
||||
# SILENT MODE #
|
||||
###############
|
||||
|
||||
if bashio::config.true 'silent'; then
|
||||
APPEND=' > /dev/null'
|
||||
sed -i '$s|$|'"$APPEND"'|' /etc/services.d/*/run
|
||||
bashio::log.info 'Silent mode activated, all logs from emby server are hidden. Disable this option if you need to troubleshoot the addon.'
|
||||
APPEND=' > /dev/null'
|
||||
sed -i '$s|$|'"$APPEND"'|' /etc/services.d/*/run
|
||||
bashio::log.info 'Silent mode activated, all logs from emby server are hidden. Disable this option if you need to troubleshoot the addon.'
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#####################
|
||||
# Autodiscover mqtt #
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [ -d /config/filebrowser ]; then
|
||||
echo "Moving to new location /config/addons_config/filebrowser"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
slug=flexget
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#####################
|
||||
# Autodiscover mqtt #
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
for k in $(bashio::jq "${__BASHIO_ADDON_CONFIG}" 'keys | .[]'); do
|
||||
printf "$(bashio::config $k)" > /var/run/s6/container_environment/$k
|
||||
printf "$(bashio::config $k)" >/var/run/s6/container_environment/$k
|
||||
done
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
echo "Updating folders..."
|
||||
echo "Updating folders..."
|
||||
|
||||
for FOLDERS in "/share/grav" "/app/grav-admin/backup"
|
||||
do
|
||||
for FOLDERS in "/share/grav" "/app/grav-admin/backup"; do
|
||||
echo "... $FOLDERS"
|
||||
mkdir -p $FOLDERS
|
||||
chown -R abc:abc $FOLDERS
|
||||
done
|
||||
|
||||
bashio::log.warning "If error of missing folder when loading addon, just restart"
|
||||
bashio::log.warning "If error of missing folder when loading addon, just restart"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [ ! -d /share/music ]; then
|
||||
echo "Creating /share/music"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
ocpath="${NEXTCLOUD_PATH}"
|
||||
htuser='abc'
|
||||
@@ -44,13 +45,11 @@ chown -R ${htuser}:${htgroup} /ssl/nextcloud/keys || true
|
||||
chmod +x ${ocpath}/occ
|
||||
|
||||
printf "chmod/chown .htaccess\n"
|
||||
if [ -f ${ocpath}/.htaccess ]
|
||||
then
|
||||
if [ -f ${ocpath}/.htaccess ]; then
|
||||
chmod 0644 ${ocpath}/.htaccess
|
||||
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
|
||||
fi
|
||||
if [ -f ${ocpath}/data/.htaccess ]
|
||||
then
|
||||
if [ -f ${ocpath}/data/.htaccess ]; then
|
||||
chmod 0644 ${ocpath}/data/.htaccess
|
||||
chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
PUID=$(bashio::config "PUID")
|
||||
PGID=$(bashio::config "PGID")
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
if bashio::config.true 'use_own_certs'; then
|
||||
|
||||
@@ -26,7 +27,7 @@ echo "... adding ssl certs in files"
|
||||
#Sets certificates
|
||||
for NGINXFILE in "/defaults/default" "/config/nginx/site-confs/default" "/data/config/nginx/site-confs/default"; do
|
||||
if [ -f $NGINXFILE ]; then
|
||||
LINE=$(sed -n "/ssl_certificate /=" $NGINXFILE)
|
||||
LINE=$(sed -n "/ssl_certificate /=" $NGINXFILE)
|
||||
if [ ! -z $LINE ]; then
|
||||
sed -i "/ssl_certificate/ d" $NGINXFILE
|
||||
sed -i "$LINE i ssl_certificate_key /ssl/$KEYFILE;" $NGINXFILE
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#create folders
|
||||
datadirectory=$(bashio::config 'data_directory')
|
||||
@@ -6,17 +7,17 @@ mkdir -p \
|
||||
$datadirectory \
|
||||
/data/config/nextcloud/config \
|
||||
/data/config/nextcloud/data \
|
||||
/data/config/www/nextcloud/config
|
||||
/data/config/www/nextcloud/config
|
||||
|
||||
#permissions
|
||||
chown abc:abc \
|
||||
$datadirectory \
|
||||
/data/config/nextcloud/config \
|
||||
/data/config/nextcloud/data \
|
||||
/data/config/www/nextcloud/config
|
||||
|
||||
chown -R abc:abc \
|
||||
/data/config/www/nextcloud/config
|
||||
|
||||
chown -R abc:abc \
|
||||
/var/lib/nginx
|
||||
|
||||
|
||||
rm -r /data/config/www/nextcloud/assets &>/dev/null
|
||||
chmod -R 777 /data/config
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Change data directory
|
||||
datadirectory=$(bashio::config 'data_directory')
|
||||
@@ -6,7 +7,7 @@ bashio::log.info "Setting data diretory: ${datadirectory}"
|
||||
sed -i "s|%%datadirectory%%|$datadirectory|g" /defaults/config.php
|
||||
|
||||
# copy config
|
||||
[[ ! -f /data/config/www/nextcloud/config/config.php ]] && \
|
||||
[[ ! -f /data/config/www/nextcloud/config/config.php ]] &&
|
||||
cp /defaults/config.php /data/config/www/nextcloud/config/config.php
|
||||
|
||||
# permissions
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ" || bashio::log.info "/data/config/www/nextcloud/occ not found"
|
||||
if ! bashio::fs.file_exists '/data/config/www/nextcloud/occ'; then
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
if bashio::services.available 'mysql'; then
|
||||
bashio::log.warning "MariaDB addon was found! It can't be configured automatically, but you can configure it manually using those values in the initial set-up :"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ" || bashio::log.info "/data/config/www/nextcloud/occ not found"
|
||||
if ! bashio::fs.file_exists '/data/config/www/nextcloud/occ'; then
|
||||
@@ -27,14 +28,14 @@ if bashio::config.has_value 'OCR'; then
|
||||
if bashio::config.has_value 'OCRLANG'; then
|
||||
OCRLANG=$(bashio::config 'OCRLANG')
|
||||
for LANG in $(echo "$OCRLANG" | tr "," " "); do
|
||||
if [ $LANG != "eng" ]; then
|
||||
apk add --quiet --no-cache tesseract-ocr-data-$LANG || apk add --quiet --no-cache tesseract-ocr-data-$LANG@community
|
||||
fi
|
||||
bashio::log.info "OCR Language installed : $LANG" || bashio::log.fatal "Couldn't install OCR lang $LANG. Please check its format is conform"
|
||||
# Downloading trainer data
|
||||
cd /usr/share/tessdata
|
||||
rm -r $LANG.traineddata &>/dev/null || true
|
||||
wget https://github.com/tesseract-ocr/tessdata/raw/main/$LANG.traineddata &>/dev/null
|
||||
if [ $LANG != "eng" ]; then
|
||||
apk add --quiet --no-cache tesseract-ocr-data-$LANG || apk add --quiet --no-cache tesseract-ocr-data-$LANG@community
|
||||
fi
|
||||
bashio::log.info "OCR Language installed : $LANG" || bashio::log.fatal "Couldn't install OCR lang $LANG. Please check its format is conform"
|
||||
# Downloading trainer data
|
||||
cd /usr/share/tessdata
|
||||
rm -r $LANG.traineddata &>/dev/null || true
|
||||
wget https://github.com/tesseract-ocr/tessdata/raw/main/$LANG.traineddata &>/dev/null
|
||||
done
|
||||
fi
|
||||
elif $(bashio::config 'OCR') = false; then
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ" || bashio::log.info "/data/config/www/nextcloud/occ not found"
|
||||
if ! bashio::fs.file_exists '/data/config/www/nextcloud/occ'; then
|
||||
@@ -20,15 +21,15 @@ if bashio::config.has_value 'trusted_domains'; then
|
||||
bashio::log.info "Currently set trusted domains :"
|
||||
$LAUNCHER config:system:get trusted_domains || bashio::log.info "No trusted domain set yet. The first one will be set when doing initial configuration"
|
||||
|
||||
bashio::log.info "Trusted domains set in the configuration. Refreshing domains." && \
|
||||
###################################
|
||||
# Remove previous trusted domains #
|
||||
###################################
|
||||
bashio::log.info "... removing previously added trusted domain (except for first one created)"
|
||||
bashio::log.info "Trusted domains set in the configuration. Refreshing domains." &&
|
||||
###################################
|
||||
# Remove previous trusted domains #
|
||||
###################################
|
||||
bashio::log.info "... removing previously added trusted domain (except for first one created)"
|
||||
i=2
|
||||
until [ $i -gt 5 ]; do
|
||||
$LAUNCHER config:system:delete trusted_domains $i && \
|
||||
((i = i + 1)) || exit
|
||||
$LAUNCHER config:system:delete trusted_domains $i &&
|
||||
((i = i + 1)) || exit
|
||||
done
|
||||
|
||||
###########################
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
slug=nzbget
|
||||
|
||||
|
||||
if [ ! -d /config/addons_config/$slug ]; then
|
||||
|
||||
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/
|
||||
rm -r /config/$slug
|
||||
fi
|
||||
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/
|
||||
rm -r /config/$slug
|
||||
fi
|
||||
|
||||
echo "Creating /config/addons_config/$slug"
|
||||
mkdir -p /config/addons_config/$slug
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
slug=ombi
|
||||
|
||||
|
||||
if [ ! -d /config/addons_config/$slug ]; then
|
||||
|
||||
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/
|
||||
rm -r /config/$slug
|
||||
fi
|
||||
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/
|
||||
rm -r /config/$slug
|
||||
fi
|
||||
|
||||
echo "Creating /config/addons_config/$slug"
|
||||
mkdir -p /config/addons_config/$slug
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [ ! -d /data/organizr ]; then
|
||||
echo "Creating /data/organizr"
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
slug=paperless
|
||||
|
||||
|
||||
if [ ! -d /config/addons_config/$slug ]; then
|
||||
|
||||
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/
|
||||
rm -r /config/$slug
|
||||
fi
|
||||
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/
|
||||
rm -r /config/$slug
|
||||
fi
|
||||
|
||||
echo "Creating /config/addons_config/$slug"
|
||||
mkdir -p /config/addons_config/$slug
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
echo "Installing pikepdf..."
|
||||
(
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
export TERM="xterm-256color"
|
||||
apt-get update
|
||||
apt-get install -yq libxml2-dev libxslt-dev python-dev
|
||||
apt-get install -yq libjpeg-dev zlib1g-dev
|
||||
apt-get install -yq python3-dev build-essential
|
||||
pip install pikepdf --force-reinstall
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
export TERM="xterm-256color"
|
||||
apt-get update
|
||||
apt-get install -yq libxml2-dev libxslt-dev python-dev
|
||||
apt-get install -yq libjpeg-dev zlib1g-dev
|
||||
apt-get install -yq python3-dev build-essential
|
||||
pip install pikepdf --force-reinstall
|
||||
) >/dev/null
|
||||
echo "... success!"
|
||||
echo "... success!"
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
OCRLANG=$(bashio::config 'OCRLANG')
|
||||
if [ -n "$OCRLANG" ]; then
|
||||
apt-get update &>/dev/null
|
||||
echo "OCRLANG variable is set, processing the language packages"
|
||||
for i in ${OCRLANG//,/ }; do
|
||||
if apt-cache show tesseract-ocr-"${i}" > /dev/null 2>&1; then
|
||||
if apt-cache show tesseract-ocr-"${i}" >/dev/null 2>&1; then
|
||||
apt-get install -yq tesseract-ocr-"${i}"
|
||||
bashio::log.info "OCR Language installed : $i" || bashio::log.fatal "Couldn't install OCR lang $i. Please check its format is conform"
|
||||
else
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Allow OCR setting
|
||||
OCRLANG="$(bashio::config "ocrlang")"
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
##################
|
||||
# SELECT FOLDERS #
|
||||
##################
|
||||
|
||||
#Set media dir
|
||||
MEDIADIR='"'$(bashio::config 'storage_dir')'"'
|
||||
#clean data
|
||||
sed -i '/MEDIA_DIR/d' /data/config/papermerge.conf.py
|
||||
#add data
|
||||
sed -i "2 i\MEDIA_DIR = $MEDIADIR" /data/config/papermerge.conf.py
|
||||
bashio::log.info "Storage dir set to $MEDIADIR"
|
||||
#Set media dir
|
||||
MEDIADIR='"'$(bashio::config 'storage_dir')'"'
|
||||
#clean data
|
||||
sed -i '/MEDIA_DIR/d' /data/config/papermerge.conf.py
|
||||
#add data
|
||||
sed -i "2 i\MEDIA_DIR = $MEDIADIR" /data/config/papermerge.conf.py
|
||||
bashio::log.info "Storage dir set to $MEDIADIR"
|
||||
|
||||
#Set import dir
|
||||
IMPORTDIR='"'$(bashio::config 'import_dir')'"'
|
||||
#clean data
|
||||
sed -i '/IMPORTER_DIR/d' /data/config/papermerge.conf.py || true
|
||||
#add data
|
||||
sed -i "2 i\IMPORTER_DIR = $MEDIADIR" /data/config/papermerge.conf.py
|
||||
bashio::log.info "Import dir set to $IMPORTDIR"
|
||||
#Set import dir
|
||||
IMPORTDIR='"'$(bashio::config 'import_dir')'"'
|
||||
#clean data
|
||||
sed -i '/IMPORTER_DIR/d' /data/config/papermerge.conf.py || true
|
||||
#add data
|
||||
sed -i "2 i\IMPORTER_DIR = $MEDIADIR" /data/config/papermerge.conf.py
|
||||
bashio::log.info "Import dir set to $IMPORTDIR"
|
||||
|
||||
##################
|
||||
# CREATE FOLDERS #
|
||||
@@ -30,16 +31,14 @@ if [ ! -d /config ]; then
|
||||
fi
|
||||
chown -R abc:abc /config
|
||||
|
||||
|
||||
if [ ! -d $MEDIADIR ]; then
|
||||
echo "Creating $MEDIADIR"
|
||||
mkdir -p $MEDIADIR
|
||||
fi
|
||||
chown -R abc:abc $MEDIADIR
|
||||
|
||||
|
||||
if [ ! -d $IMPORTDIR ]; then
|
||||
echo "Creating $IMPORTDIR"
|
||||
mkdir -p $IMPORTDIR
|
||||
fi
|
||||
fi
|
||||
chown -R abc:abc $IMPORTDIR
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
##################
|
||||
# SYMLINK CONFIG #
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
##################
|
||||
# SYMLINK CONFIG #
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
if [ -e "/PORTFILE" ]; then
|
||||
echo "Installing portainer..."
|
||||
echo "Installing portainer..."
|
||||
BUILD_UPSTREAM=$(</PORTFILE)
|
||||
BUILD_ARCH=$(uname -m)
|
||||
|
||||
@@ -14,9 +15,9 @@ if [ -e "/PORTFILE" ]; then
|
||||
if [[ "${BUILD_ARCH}" == *armv7* ]]; then ARCH="arm"; fi
|
||||
if [[ "${BUILD_ARCH}" == arm ]]; then ARCH="arm"; fi
|
||||
if [[ "${BUILD_ARCH}" == *x86* ]]; then ARCH="amd64"; fi
|
||||
|
||||
|
||||
curl -L -s \
|
||||
"https://github.com/portainer/portainer/releases/download/${BUILD_UPSTREAM}/portainer-${BUILD_UPSTREAM}-linux-${ARCH}.tar.gz" \
|
||||
| tar zxvf - -C /opt/
|
||||
echo "... success!"
|
||||
fi
|
||||
"https://github.com/portainer/portainer/releases/download/${BUILD_UPSTREAM}/portainer-${BUILD_UPSTREAM}-linux-${ARCH}.tar.gz" |
|
||||
tar zxvf - -C /opt/
|
||||
echo "... success!"
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#################
|
||||
# NGINX SETTING #
|
||||
@@ -9,14 +10,14 @@ declare portainer_protocol=http
|
||||
|
||||
# Generate Ingress configuration
|
||||
if bashio::config.true 'ssl'; then
|
||||
bashio::config.require.ssl
|
||||
portainer_protocol=https
|
||||
sed -i "s|9000|9443|g" /etc/nginx/includes/upstream.conf
|
||||
sed -i "s|9000|9443|g" /etc/services.d/nginx/run
|
||||
sed -i "s|9099 default_server|9099 ssl|g" /etc/nginx/templates/ingress.gtpl
|
||||
sed -i '7 i ssl_certificate /ssl/{{ .certfile }};' /etc/nginx/templates/ingress.gtpl
|
||||
sed -i '7 i ssl_certificate_key /ssl/{{ .keyfile }};' /etc/nginx/templates/ingress.gtpl
|
||||
bashio::log.info "Ssl enabled, please use https for connection"
|
||||
bashio::config.require.ssl
|
||||
portainer_protocol=https
|
||||
sed -i "s|9000|9443|g" /etc/nginx/includes/upstream.conf
|
||||
sed -i "s|9000|9443|g" /etc/services.d/nginx/run
|
||||
sed -i "s|9099 default_server|9099 ssl|g" /etc/nginx/templates/ingress.gtpl
|
||||
sed -i '7 i ssl_certificate /ssl/{{ .certfile }};' /etc/nginx/templates/ingress.gtpl
|
||||
sed -i '7 i ssl_certificate_key /ssl/{{ .keyfile }};' /etc/nginx/templates/ingress.gtpl
|
||||
bashio::log.info "Ssl enabled, please use https for connection"
|
||||
fi
|
||||
|
||||
bashio::var.json \
|
||||
@@ -25,8 +26,7 @@ bashio::var.json \
|
||||
protocol "${portainer_protocol}" \
|
||||
certfile "$(bashio::config 'certfile')" \
|
||||
keyfile "$(bashio::config 'keyfile')" \
|
||||
ssl "^$(bashio::config 'ssl')" \
|
||||
| tempio \
|
||||
ssl "^$(bashio::config 'ssl')" |
|
||||
tempio \
|
||||
-template /etc/nginx/templates/ingress.gtpl \
|
||||
-out /etc/nginx/servers/ingress.conf
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
# Home Assistant Community Add-on: Portainer
|
||||
# Runs some initializations for Portainer
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
|
||||
bashio::log.info "Waiting for port 9000 to open..."
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#################
|
||||
# NGINX SETTING #
|
||||
@@ -9,7 +10,7 @@ declare qbittorrent_protocol=http
|
||||
|
||||
# Generate Ingress configuration
|
||||
if bashio::config.true 'ssl'; then
|
||||
qbittorrent_protocol=https
|
||||
qbittorrent_protocol=https
|
||||
fi
|
||||
|
||||
cp /etc/nginx/templates/ingress.gtpl /etc/nginx/servers/ingress.conf
|
||||
@@ -20,17 +21,16 @@ sed -i "s|{{ .certfile }}|$(bashio::config 'certfile')|g" /etc/nginx/servers/ing
|
||||
sed -i "s|{{ .keyfile }}|$(bashio::config 'keyfile')|g" /etc/nginx/servers/ingress.conf
|
||||
sed -i "s|{{ .ssl }}|$(bashio::config 'ssl')|g" /etc/nginx/servers/ingress.conf
|
||||
|
||||
|
||||
######################
|
||||
# VUETORRENT INSTALL #
|
||||
######################
|
||||
|
||||
LATEST_RELEASE=$(curl -s -L https://api.github.com/repos/wdaan/vuetorrent/releases/latest \
|
||||
| grep "browser_download_url.*zip" \
|
||||
| cut -d : -f 2,3 \
|
||||
| tr -d \" \
|
||||
| xargs)
|
||||
LATEST_RELEASE=$(curl -s -L https://api.github.com/repos/wdaan/vuetorrent/releases/latest |
|
||||
grep "browser_download_url.*zip" |
|
||||
cut -d : -f 2,3 |
|
||||
tr -d \" |
|
||||
xargs)
|
||||
|
||||
curl -s -S -O -J -L $LATEST_RELEASE
|
||||
unzip -o vuetorrent.zip -d / >/dev/null
|
||||
unzip -o vuetorrent.zip -d / >/dev/null
|
||||
rm /vuetorrent.zip >/dev/null
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
##########
|
||||
# INIT #
|
||||
@@ -28,7 +29,7 @@ fi
|
||||
if bashio::config.has_value 'SavePath'; then
|
||||
DOWNLOADS=$(bashio::config 'SavePath')
|
||||
#sed -i '/DefaultSavePath/d' qBittorrent.conf
|
||||
#sed -i "$LINE i\Session\\\DefaultSavePath=$DOWNLOADS" qBittorrent.conf
|
||||
#sed -i "$LINE i\Session\\\DefaultSavePath=$DOWNLOADS" qBittorrent.conf
|
||||
sed -i '/SavePath/d' qBittorrent.conf
|
||||
sed -i "$LINE i\Downloads\\\SavePath=$DOWNLOADS" qBittorrent.conf
|
||||
mkdir -p $DOWNLOADS || bashio::log.fatal "Error : folder defined in SavePath doesn't exist and can't be created. Check path"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
|
||||
declare openvpn_config
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
WEBUI_PORT=${WEBUI_PORT:-8080}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
|
||||
# Wait for transmission to become available
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
WEBUI_PORT=${WEBUI_PORT:-8080}
|
||||
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
WEBUI_PORT=${WEBUI_PORT:-8080}
|
||||
RUNTIME=$(bashio::config 'run_duration')
|
||||
|
||||
if bashio::config.true 'openvpn_enabled'; then
|
||||
exec /usr/sbin/openvpn --config /etc/openvpn/config.ovpn --script-security 2 --up /etc/openvpn/up.sh --down /etc/openvpn/down.sh \
|
||||
& bashio::log.warning "The run_duration option is set. The addon will stop after $RUNTIME"
|
||||
&
|
||||
bashio::log.warning "The run_duration option is set. The addon will stop after $RUNTIME"
|
||||
else
|
||||
exec s6-setuidgid abc /usr/bin/qbittorrent-nox --webui-port="${WEBUI_PORT}" \
|
||||
& bashio::log.warning "The run_duration option is set. The addon will stop after $RUNTIME"
|
||||
fi
|
||||
&
|
||||
bashio::log.warning "The run_duration option is set. The addon will stop after $RUNTIME"
|
||||
fi
|
||||
|
||||
sleep $RUNTIME || bashio::log.fatal "run_duration format is not correct. Use 5d or 5h or 5m for example"
|
||||
bashio::log.info "Timeout achieved, addon will stop !"
|
||||
bashio::log.info "Timeout achieved, addon will stop !"
|
||||
sleep 60s
|
||||
bashio::addon.stop
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
CONFIG_LOCATION=$(bashio::config 'CONFIG_LOCATION')
|
||||
bashio::log.info "Config stored in $CONFIG_LOCATION"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
##############
|
||||
# Data usage #
|
||||
@@ -13,12 +14,12 @@ chown -R abc:abc /data
|
||||
|
||||
# correct viewport bug
|
||||
# grep -rl '"lt-md":"(max-width: 959px)"' /app | xargs sed -i 's|"lt-md":"(max-width: 959px)"|"lt-md":"(max-width: 100px)"|g' || true
|
||||
|
||||
|
||||
######################
|
||||
# API URL CORRECTION #
|
||||
######################
|
||||
|
||||
# allow true url for ingress
|
||||
# allow true url for ingress
|
||||
grep -rl '/api/' /app | xargs sed -i 's|/api/|api/|g' || true
|
||||
grep -rl 'api/' /app | xargs sed -i 's|api/|./api/|g' || true
|
||||
|
||||
@@ -35,15 +36,15 @@ FREQUENCY=$(bashio::config 'Updates')
|
||||
bashio::log.info "$FREQUENCY updates"
|
||||
|
||||
case $FREQUENCY in
|
||||
"Hourly")
|
||||
sed -i -e '$a 0 * * * * /run.sh' /etc/crontabs/root
|
||||
;;
|
||||
"Hourly")
|
||||
sed -i -e '$a 0 * * * * /run.sh' /etc/crontabs/root
|
||||
;;
|
||||
|
||||
"Daily")
|
||||
sed -i -e '$a 0 0 * * * /run.sh' /etc/crontabs/root
|
||||
;;
|
||||
"Daily")
|
||||
sed -i -e '$a 0 0 * * * /run.sh' /etc/crontabs/root
|
||||
;;
|
||||
|
||||
"Weekly")
|
||||
sed -i -e '$a 0 0 * * 0 /run.sh' /etc/crontabs/root
|
||||
;;
|
||||
"Weekly")
|
||||
sed -i -e '$a 0 0 * * 0 /run.sh' /etc/crontabs/root
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#################
|
||||
# NGINX SETTING #
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
|
||||
# Wait for transmission to become available
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# wait for scrutiny to load
|
||||
bashio::net.wait_for 8080
|
||||
|
||||
|
||||
#####################
|
||||
# ADD LOCAL DEVICES #
|
||||
#####################
|
||||
|
||||
# search for local devices
|
||||
scrutiny-collector-metrics run >/dev/null && bashio::log.info "Local Devices Added" || bashio::log.error "Local Devices Not Added"
|
||||
scrutiny-collector-metrics run >/dev/null && bashio::log.info "Local Devices Added" || bashio::log.error "Local Devices Not Added"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
slug="tandoor_recipes"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
#####################
|
||||
# Export env values #
|
||||
@@ -26,20 +27,20 @@ mariadb_addon)
|
||||
bashio::log.info "Using MariaDB addon. Requirements : running MariaDB addon. Discovering values..."
|
||||
if ! bashio::services.available 'mysql'; then
|
||||
bashio::log.fatal \
|
||||
"Local database access should be provided by the MariaDB addon"
|
||||
"Local database access should be provided by the MariaDB addon"
|
||||
bashio::exit.nok \
|
||||
"Please ensure it is installed and started"
|
||||
"Please ensure it is installed and started"
|
||||
fi
|
||||
|
||||
# Install mysqlclient
|
||||
pip install pymysql &>/dev/null
|
||||
|
||||
|
||||
# Use values
|
||||
export DB_ENGINE=django.db.backends.mysql
|
||||
export POSTGRES_HOST=$(bashio::services "mysql" "host") && bashio::log.blue "POSTGRES_HOST=$POSTGRES_HOST"
|
||||
export POSTGRES_PORT=$(bashio::services "mysql" "port") && bashio::log.blue "POSTGRES_PORT=$POSTGRES_PORT"
|
||||
export POSTGRES_DB=/data/
|
||||
|
||||
|
||||
.db && bashio::log.blue "POSTGRES_DB=$POSTGRES_DB"
|
||||
export POSTGRES_USER=$(bashio::services "mysql" "username") && bashio::log.blue "POSTGRES_USER=$POSTGRES_USER"
|
||||
export POSTGRES_PASSWORD=$(bashio::services "mysql" "password") && bashio::log.blue "POSTGRES_PASSWORD=$POSTGRES_PASSWORD"
|
||||
@@ -74,4 +75,4 @@ ln -s /data/recipes/staticfiles /opt/recipes
|
||||
|
||||
bashio::log.info "Launching app"
|
||||
cd /opt/recipes
|
||||
./boot.sh
|
||||
./boot.sh
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
rm -rf /etc/cont-init.d/20-config || true
|
||||
|
||||
@@ -37,7 +38,7 @@ fi
|
||||
if bashio::config.has_value 'customUI'; then
|
||||
CUSTOMUI=$(bashio::config 'customUI')
|
||||
[ $CUSTOMUI != "standard" ] && sed -i "1a export TRANSMISSION_WEB_HOME=\"/$CUSTOMUI/\"" /etc/services.d/transmission/run
|
||||
|
||||
|
||||
# Enable transmission-web-control return to default UI
|
||||
if [ ! -f "/transmission-web-control/index.original.html" ]; then
|
||||
ln -s /usr/share/transmission/web/style /transmission-web-control
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
JSONTOCHECK='/config/transmission/settings.json'
|
||||
JSONSOURCE='/defaults/settings.json'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
###################
|
||||
# INGRESS SETTING #
|
||||
@@ -11,7 +12,7 @@ declare keyfile
|
||||
|
||||
# General values
|
||||
port=$(bashio::addon.ingress_port)
|
||||
if [ $port > 1 ]; then
|
||||
if [ $port ] >1; then
|
||||
# Adapt nginx
|
||||
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
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
slug=ubooquity
|
||||
|
||||
|
||||
if [ ! -d /config/addons_config/$slug ]; then
|
||||
|
||||
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/
|
||||
rm -r /config/$slug
|
||||
fi
|
||||
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/
|
||||
rm -r /config/$slug
|
||||
fi
|
||||
|
||||
echo "Creating /config/addons_config/$slug"
|
||||
mkdir -p /config/addons_config/$slug
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
###############
|
||||
# SSL SETTING #
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
###########
|
||||
# FOLDERS #
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
################
|
||||
# Alternate UI #
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
# ==============================================================================
|
||||
|
||||
# Wait for transmission to become available
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Define home
|
||||
HOME="/share/webtop"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Uprade
|
||||
echo "Updating distribution"
|
||||
@@ -8,20 +9,20 @@ apt-get -y upgrade >/dev/null || true
|
||||
|
||||
# Fix mate software center
|
||||
if [ -f /usr/lib/dbus-1.0/dbus-daemon-launch-helper ]; then
|
||||
echo "Allow software center"
|
||||
chmod u+s /usr/lib/dbus-1.0/dbus-daemon-launch-helper
|
||||
service dbus restart
|
||||
echo "Allow software center"
|
||||
chmod u+s /usr/lib/dbus-1.0/dbus-daemon-launch-helper
|
||||
service dbus restart
|
||||
fi
|
||||
|
||||
# Install specific apps
|
||||
if bashio::config.has_value 'additional_apps'; then
|
||||
bashio::log.info "Installing additional apps :"
|
||||
# Install apps
|
||||
for APP in $(echo "$(bashio::config 'additional_apps')" | tr "," " "); do
|
||||
bashio::log.green "... $APP"
|
||||
# Test install with both apt-get and snap
|
||||
apt-get install -yqq $APP &>/dev/null \
|
||||
&& bashio::log.green "... done" \
|
||||
|| bashio::log.red "... not successful, please check package name"
|
||||
done
|
||||
bashio::log.info "Installing additional apps :"
|
||||
# Install apps
|
||||
for APP in $(echo "$(bashio::config 'additional_apps')" | tr "," " "); do
|
||||
bashio::log.green "... $APP"
|
||||
# Test install with both apt-get and snap
|
||||
apt-get install -yqq $APP &>/dev/null &&
|
||||
bashio::log.green "... done" ||
|
||||
bashio::log.red "... not successful, please check package name"
|
||||
done
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user