Github bot : script beautyshied

This commit is contained in:
github-actions
2023-04-30 00:13:01 +00:00
parent c7b09827ce
commit c586e5bc49
6 changed files with 22 additions and 22 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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')

View File

@@ -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