From c586e5bc49359fa32fa6c9a87a3a61fa4462ed1c Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 30 Apr 2023 00:13:01 +0000 Subject: [PATCH] Github bot : script beautyshied --- .../rootfs/etc/cont-init.d/00-data_location.sh | 4 ++-- immich/rootfs/etc/cont-init.d/99-database.sh | 4 ++-- photoprism/rootfs/etc/cont-init.d/00-folders.sh | 16 ++++++++-------- photoprism/rootfs/etc/cont-init.d/99-run.sh | 12 ++++++------ photoprism/rootfs/run.sh | 4 ++-- .../rootfs/etc/cont-init.d/00-data_location.sh | 4 ++-- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/calibre/rootfs/etc/cont-init.d/00-data_location.sh b/calibre/rootfs/etc/cont-init.d/00-data_location.sh index 18caa6ee8..4406dc569 100755 --- a/calibre/rootfs/etc/cont-init.d/00-data_location.sh +++ b/calibre/rootfs/etc/cont-init.d/00-data_location.sh @@ -48,10 +48,10 @@ if [ -d /var/run/s6/container_environment ]; then printf "%s" "$LOCATION" > /var/run/s6/container_environment/HOME printf "%s" "$LOCATION" > /var/run/s6/container_environment/FM_HOME fi - { +{ printf "%s" "HOME=\"$LOCATION\"" printf "%s" "FM_HOME=\"$LOCATION\"" - } >> ~/.bashrc +} >> ~/.bashrc usermod --home "$LOCATION" abc diff --git a/immich/rootfs/etc/cont-init.d/99-database.sh b/immich/rootfs/etc/cont-init.d/99-database.sh index d8fc8fccb..77e677b9d 100755 --- a/immich/rootfs/etc/cont-init.d/99-database.sh +++ b/immich/rootfs/etc/cont-init.d/99-database.sh @@ -83,11 +83,11 @@ if [ -d /var/run/s6/container_environment ]; then printf "%s" "$JWT_SECRET" > /var/run/s6/container_environment/JWT_SECRET fi - { +{ printf "%s" "DB_USERNAME=\"$DB_USERNAME\"" printf "%s" "DB_PASSWORD=\"$DB_PASSWORD\"" printf "%s" "DB_DATABASE_NAME=\"$DB_DATABASE_NAME\"" printf "%s" "DB_PORT=\"$DB_PORT\"" printf "%s" "DB_HOSTNAME=\"$DB_HOSTNAME\"" printf "%s" "JWT_SECRET=\"$JWT_SECRET\"" - } >> ~/.bashrc +} >> ~/.bashrc diff --git a/photoprism/rootfs/etc/cont-init.d/00-folders.sh b/photoprism/rootfs/etc/cont-init.d/00-folders.sh index 1a2573bfb..342510062 100755 --- a/photoprism/rootfs/etc/cont-init.d/00-folders.sh +++ b/photoprism/rootfs/etc/cont-init.d/00-folders.sh @@ -12,18 +12,18 @@ fi bashio::log.info "Preparing scripts" echo "... creating structure" mkdir -p \ - /data/photoprism/originals \ - /data/photoprism/import \ - /data/photoprism/storage/config \ - /data/photoprism/backup \ - /data/photoprism/storage/cache + /data/photoprism/originals \ + /data/photoprism/import \ + /data/photoprism/storage/config \ + /data/photoprism/backup \ + /data/photoprism/storage/cache echo "... setting permissions" chmod -R 777 /data/photoprism chown -Rf photoprism:photoprism /data/photoprism chmod -Rf a+rwx /data/photoprism for line in BACKUP_PATH IMPORT_PATH ORIGINALS_PATH STORAGE_PATH; do - mkdir -p "$line" - chmod -R 777 "$line" - chown -Rf photoprism:photoprism "$line" + mkdir -p "$line" + chmod -R 777 "$line" + chown -Rf photoprism:photoprism "$line" done diff --git a/photoprism/rootfs/etc/cont-init.d/99-run.sh b/photoprism/rootfs/etc/cont-init.d/99-run.sh index 8475ef6e8..b85cda15f 100755 --- a/photoprism/rootfs/etc/cont-init.d/99-run.sh +++ b/photoprism/rootfs/etc/cont-init.d/99-run.sh @@ -45,13 +45,13 @@ case $(bashio::config 'DB_TYPE') in export PHOTOPRISM_DATABASE_PASSWORD && \ bashio::log.blue "PHOTOPRISM_DATABASE_PASSWORD=$PHOTOPRISM_DATABASE_PASSWORD" - { + { printf "%s" "PHOTOPRISM_DATABASE_DRIVER=\"${PHOTOPRISM_DATABASE_DRIVER}\"" printf "%s" "PHOTOPRISM_DATABASE_SERVER=\"${PHOTOPRISM_DATABASE_SERVER}\"" printf "%s" "PHOTOPRISM_DATABASE_NAME=\"${PHOTOPRISM_DATABASE_NAME}\"" printf "%s" "PHOTOPRISM_DATABASE_USER=\"${PHOTOPRISM_DATABASE_USER}\"" printf "%s" "PHOTOPRISM_DATABASE_PASSWORD=\"${PHOTOPRISM_DATABASE_PASSWORD}\"" - } >> ~/.bashrc + } >> ~/.bashrc bashio::log.warning "Photoprism is using the Maria DB addon" bashio::log.warning "Please ensure this is included in your backups" @@ -97,13 +97,13 @@ export PHOTOPRISM_ORIGINALS_PATH export PHOTOPRISM_IMPORT_PATH export PHOTOPRISM_BACKUP_PATH - { +{ printf "%s" "PHOTOPRISM_UPLOAD_NSFW=\"${PHOTOPRISM_UPLOAD_NSFW}\"" printf "%s" "PHOTOPRISM_STORAGE_PATH=\"${PHOTOPRISM_STORAGE_PATH}\"" printf "%s" "PHOTOPRISM_ORIGINALS_PATH=\"${PHOTOPRISM_ORIGINALS_PATH}\"" printf "%s" "PHOTOPRISM_IMPORT_PATH=\"${PHOTOPRISM_IMPORT_PATH}\"" printf "%s" "PHOTOPRISM_BACKUP_PATH=\"${PHOTOPRISM_BACKUP_PATH}\"" - } >> ~/.bashrc +} >> ~/.bashrc # Test configs for variabletest in $PHOTOPRISM_STORAGE_PATH $PHOTOPRISM_ORIGINALS_PATH $PHOTOPRISM_IMPORT_PATH $PHOTOPRISM_BACKUP_PATH; do @@ -127,10 +127,10 @@ if bashio::config.has_value "PUID" && bashio::config.has_value "PGID"; then export PHOTOPRISM_GID="$PGID" sed -i "1a PHOTOPRISM_UID=$PHOTOPRISM_UID" /scripts/entrypoint.sh sed -i "1a PHOTOPRISM_GID=$PHOTOPRISM_GID" /scripts/entrypoint.sh - { + { printf "%s" "PHOTOPRISM_UID=\"${PHOTOPRISM_UID}\"" printf "%s" "PHOTOPRISM_GID=\"${PHOTOPRISM_GID}\"" - } >> ~/.bashrc + } >> ~/.bashrc fi # Start messages diff --git a/photoprism/rootfs/run.sh b/photoprism/rootfs/run.sh index 55a9d5f39..d0d8edd89 100755 --- a/photoprism/rootfs/run.sh +++ b/photoprism/rootfs/run.sh @@ -27,13 +27,13 @@ export PHOTOPRISM_ORIGINALS_PATH=$(bashio::config 'ORIGINALS_PATH') export PHOTOPRISM_IMPORT_PATH=$(bashio::config 'IMPORT_PATH') export PHOTOPRISM_BACKUP_PATH=$(bashio::config 'BACKUP_PATH') - { +{ printf "%s" "PHOTOPRISM_UPLOAD_NSFW=\"${PHOTOPRISM_UPLOAD_NSFW}\"" printf "%s" "PHOTOPRISM_STORAGE_PATH=\"${PHOTOPRISM_STORAGE_PATH}\"" printf "%s" "PHOTOPRISM_ORIGINALS_PATH=\"${PHOTOPRISM_ORIGINALS_PATH}\"" printf "%s" "PHOTOPRISM_IMPORT_PATH=\"${PHOTOPRISM_IMPORT_PATH}\"" printf "%s" "PHOTOPRISM_BACKUP_PATH=\"${PHOTOPRISM_BACKUP_PATH}\"" - } >> ~/.bashrc +} >> ~/.bashrc if bashio::config.has_value 'CUSTOM_OPTIONS'; then CUSTOMOPTIONS=$(bashio::config 'CUSTOM_OPTIONS') diff --git a/webtop_kde/rootfs/etc/cont-init.d/00-data_location.sh b/webtop_kde/rootfs/etc/cont-init.d/00-data_location.sh index 7ef5c0770..f2faaa38e 100755 --- a/webtop_kde/rootfs/etc/cont-init.d/00-data_location.sh +++ b/webtop_kde/rootfs/etc/cont-init.d/00-data_location.sh @@ -42,8 +42,8 @@ sed -i "s|/share/webtop_kde|$LOCATION|g" $(find /etc/s6-overlay/s6-rc.d -type f) if [ -d /var/run/s6/container_environment ]; then printf "%s" "$LOCATION" > /var/run/s6/container_environment/HOME; fi if [ -d /var/run/s6/container_environment ]; then printf "%s" "$LOCATION" > /var/run/s6/container_environment/FM_HOME; fi { -printf "%s" "HOME=\"$LOCATION\"" -printf "%s" "FM_HOME=\"$LOCATION\"" + printf "%s" "HOME=\"$LOCATION\"" + printf "%s" "FM_HOME=\"$LOCATION\"" } >> ~/.bashrc usermod --home "$LOCATION" abc