Export variable to bashrc

This commit is contained in:
Alexandre
2023-04-24 12:18:38 +02:00
parent 1545c8f6c6
commit a76d60808b
15 changed files with 54 additions and 11 deletions

View File

@@ -14,6 +14,7 @@ export IMMICH_MEDIA_LOCATION="$DATA_LOCATION"
if [ -d /var/run/s6/container_environment ]; then
printf "%s" "$DATA_LOCATION" > /var/run/s6/container_environment/IMMICH_MEDIA_LOCATION
fi
if [ -f ~/.bashrc ]; then printf "%s" "IMMICH_MEDIA_LOCATION=\"$DATA_LOCATION\"" >> ~/.bashrc; fi
echo "... check $DATA_LOCATION folder exists"
mkdir -p "$DATA_LOCATION"

View File

@@ -82,3 +82,11 @@ if [ -d /var/run/s6/container_environment ]; then
printf "%s" "$DB_HOSTNAME" > /var/run/s6/container_environment/DB_HOSTNAME
printf "%s" "$JWT_SECRET" > /var/run/s6/container_environment/JWT_SECRET
fi
if [ -f ~/.bashrc ]; then
printf "%s" "DB_USERNAME=\"$DB_USERNAME\"" >> ~/.bashrc
printf "%s" "DB_PASSWORD=\"$DB_PASSWORD\"" >> ~/.bashrc
printf "%s" "DB_DATABASE_NAME=\"$DB_DATABASE_NAME\"" >> ~/.bashrc
printf "%s" "DB_PORT=\"$DB_PORT\"" >> ~/.bashrc
printf "%s" "DB_HOSTNAME=\"$DB_HOSTNAME\"" >> ~/.bashrc
printf "%s" "JWT_SECRET=\"$JWT_SECRET\"" >> ~/.bashrc
fi