mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-19 05:49:12 +02:00
use echo
This commit is contained in:
@@ -51,7 +51,7 @@ for KEYS in "${arr[@]}"; do
|
|||||||
if cat /etc/cont-init.d/*run* &>/dev/null; then sed -i "1a export $line" /etc/cont-init.d/*run* 2>/dev/null; fi
|
if cat /etc/cont-init.d/*run* &>/dev/null; then sed -i "1a export $line" /etc/cont-init.d/*run* 2>/dev/null; fi
|
||||||
# For s6
|
# For s6
|
||||||
if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi
|
if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi
|
||||||
printf "%s" "\n${KEYS}=\"${VALUE}\"" >> ~/.bashrc
|
echo "export ${KEYS}=\"${VALUE}\"" >> ~/.bashrc
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ while IFS= read -r line; do
|
|||||||
sed -i "1a export $KEYS=\'$VALUE\'" /scripts/*run* 2>/dev/null || true
|
sed -i "1a export $KEYS=\'$VALUE\'" /scripts/*run* 2>/dev/null || true
|
||||||
# Export to s6
|
# Export to s6
|
||||||
if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi
|
if [ -d /var/run/s6/container_environment ]; then printf "%s" "${VALUE}" > /var/run/s6/container_environment/"${KEYS}"; fi
|
||||||
printf "%s" "\n${KEYS}=\"${VALUE}\"" >> ~/.bashrc
|
echo "export ${KEYS}=\"${VALUE}\"" >> ~/.bashrc
|
||||||
# Show in log
|
# Show in log
|
||||||
if ! bashio::config.false "verbose"; then bashio::log.blue "$KEYS=\'$VALUE\'"; fi
|
if ! bashio::config.false "verbose"; then bashio::log.blue "$KEYS=\'$VALUE\'"; fi
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -46,11 +46,11 @@ case $(bashio::config 'DB_TYPE') in
|
|||||||
bashio::log.blue "PHOTOPRISM_DATABASE_PASSWORD=$PHOTOPRISM_DATABASE_PASSWORD"
|
bashio::log.blue "PHOTOPRISM_DATABASE_PASSWORD=$PHOTOPRISM_DATABASE_PASSWORD"
|
||||||
|
|
||||||
{
|
{
|
||||||
printf "%s" "\nPHOTOPRISM_DATABASE_DRIVER=\"${PHOTOPRISM_DATABASE_DRIVER}\""
|
echo "export PHOTOPRISM_DATABASE_DRIVER=\"${PHOTOPRISM_DATABASE_DRIVER}\""
|
||||||
printf "%s" "\nPHOTOPRISM_DATABASE_SERVER=\"${PHOTOPRISM_DATABASE_SERVER}\""
|
echo "export PHOTOPRISM_DATABASE_SERVER=\"${PHOTOPRISM_DATABASE_SERVER}\""
|
||||||
printf "%s" "\nPHOTOPRISM_DATABASE_NAME=\"${PHOTOPRISM_DATABASE_NAME}\""
|
echo "export PHOTOPRISM_DATABASE_NAME=\"${PHOTOPRISM_DATABASE_NAME}\""
|
||||||
printf "%s" "\nPHOTOPRISM_DATABASE_USER=\"${PHOTOPRISM_DATABASE_USER}\""
|
echo "export PHOTOPRISM_DATABASE_USER=\"${PHOTOPRISM_DATABASE_USER}\""
|
||||||
printf "%s" "\nPHOTOPRISM_DATABASE_PASSWORD=\"${PHOTOPRISM_DATABASE_PASSWORD}\""
|
echo "export PHOTOPRISM_DATABASE_PASSWORD=\"${PHOTOPRISM_DATABASE_PASSWORD}\""
|
||||||
} >> ~/.bashrc
|
} >> ~/.bashrc
|
||||||
|
|
||||||
bashio::log.warning "Photoprism is using the Maria DB addon"
|
bashio::log.warning "Photoprism is using the Maria DB addon"
|
||||||
@@ -77,7 +77,7 @@ if bashio::config.true "ingress_disabled"; then
|
|||||||
else
|
else
|
||||||
PHOTOPRISM_SITE_URL="$(bashio::addon.ingress_entry)/"
|
PHOTOPRISM_SITE_URL="$(bashio::addon.ingress_entry)/"
|
||||||
export PHOTOPRISM_SITE_URL
|
export PHOTOPRISM_SITE_URL
|
||||||
printf "%s" "\nPHOTOPRISM_SITE_URL=\"${PHOTOPRISM_SITE_URL}\"" >> ~/.bashrc
|
echo "export PHOTOPRISM_SITE_URL=\"${PHOTOPRISM_SITE_URL}\"" >> ~/.bashrc
|
||||||
bashio::log.warning "Ingress is enabled. To connect, you must add $PHOTOPRISM_SITE_URL to the end of your access point. Example : http://my-url:8123$PHOTOPRISM_SITE_URL"
|
bashio::log.warning "Ingress is enabled. To connect, you must add $PHOTOPRISM_SITE_URL to the end of your access point. Example : http://my-url:8123$PHOTOPRISM_SITE_URL"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -98,11 +98,11 @@ export PHOTOPRISM_IMPORT_PATH
|
|||||||
export PHOTOPRISM_BACKUP_PATH
|
export PHOTOPRISM_BACKUP_PATH
|
||||||
|
|
||||||
{
|
{
|
||||||
printf "%s" "\nPHOTOPRISM_UPLOAD_NSFW=\"${PHOTOPRISM_UPLOAD_NSFW}\""
|
echo "export PHOTOPRISM_UPLOAD_NSFW=\"${PHOTOPRISM_UPLOAD_NSFW}\""
|
||||||
printf "%s" "\nPHOTOPRISM_STORAGE_PATH=\"${PHOTOPRISM_STORAGE_PATH}\""
|
echo "export PHOTOPRISM_STORAGE_PATH=\"${PHOTOPRISM_STORAGE_PATH}\""
|
||||||
printf "%s" "\nPHOTOPRISM_ORIGINALS_PATH=\"${PHOTOPRISM_ORIGINALS_PATH}\""
|
echo "export PHOTOPRISM_ORIGINALS_PATH=\"${PHOTOPRISM_ORIGINALS_PATH}\""
|
||||||
printf "%s" "\nPHOTOPRISM_IMPORT_PATH=\"${PHOTOPRISM_IMPORT_PATH}\""
|
echo "export PHOTOPRISM_IMPORT_PATH=\"${PHOTOPRISM_IMPORT_PATH}\""
|
||||||
printf "%s" "\nPHOTOPRISM_BACKUP_PATH=\"${PHOTOPRISM_BACKUP_PATH}\""
|
echo "export PHOTOPRISM_BACKUP_PATH=\"${PHOTOPRISM_BACKUP_PATH}\""
|
||||||
} >> ~/.bashrc
|
} >> ~/.bashrc
|
||||||
|
|
||||||
# Test configs
|
# Test configs
|
||||||
@@ -128,8 +128,8 @@ if bashio::config.has_value "PUID" && bashio::config.has_value "PGID"; then
|
|||||||
sed -i "1a PHOTOPRISM_UID=$PHOTOPRISM_UID" /scripts/entrypoint.sh
|
sed -i "1a PHOTOPRISM_UID=$PHOTOPRISM_UID" /scripts/entrypoint.sh
|
||||||
sed -i "1a PHOTOPRISM_GID=$PHOTOPRISM_GID" /scripts/entrypoint.sh
|
sed -i "1a PHOTOPRISM_GID=$PHOTOPRISM_GID" /scripts/entrypoint.sh
|
||||||
{
|
{
|
||||||
printf "%s" "\nPHOTOPRISM_UID=\"${PHOTOPRISM_UID}\""
|
echo "export PHOTOPRISM_UID=\"${PHOTOPRISM_UID}\""
|
||||||
printf "%s" "\nPHOTOPRISM_GID=\"${PHOTOPRISM_GID}\""
|
echo "export PHOTOPRISM_GID=\"${PHOTOPRISM_GID}\""
|
||||||
} >> ~/.bashrc
|
} >> ~/.bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user