1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/immich_ynh.git synced 2024-09-03 20:36:24 +02:00
This commit is contained in:
Sylvain 2024-03-28 19:26:48 +01:00
parent 788f9f5a28
commit 93fa4676e2

View file

@ -133,6 +133,8 @@ myynh_install_python() {
# Install immich # Install immich
myynh_install_immich() { myynh_install_immich() {
# Thanks to https://github.com/arter97/immich-native
ynh_use_nodejs ynh_use_nodejs
# Install immich-server # Install immich-server
@ -262,7 +264,7 @@ myynh_dump_psql_db() {
myynh_restore_psql_db() { myynh_restore_psql_db() {
# https://github.com/immich-app/immich/issues/5630#issuecomment-1866581570 # https://github.com/immich-app/immich/issues/5630#issuecomment-1866581570
ynh_replace_string --match_string="SELECT pg_catalog.set_config('search_path', '', false);" \ ynh_replace_string --match_string="SELECT pg_catalog.set_config('search_path', '', false);" \
--replace_string="SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);" --target_file=target_file --replace_string="SELECT pg_catalog.set_config('search_path', 'public, pg_catalog', true);" --target_file="db.sql"
sudo --login --user=postgres PGUSER=postgres PGPASSWORD="$(cat $PSQL_ROOT_PWD_FILE)" \ sudo --login --user=postgres PGUSER=postgres PGPASSWORD="$(cat $PSQL_ROOT_PWD_FILE)" \
psql --cluster="$postgresql_version/main" --dbname="$app" < ./db.sql psql --cluster="$postgresql_version/main" --dbname="$app" < ./db.sql