1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/immich_ynh.git synced 2024-09-03 20:36:24 +02:00

Add geonames

This commit is contained in:
Sylvain 2024-03-28 21:31:12 +01:00
parent 93fa4676e2
commit 0b60b00597
2 changed files with 12 additions and 1 deletions

View file

@ -66,7 +66,7 @@ ram.runtime = "500M"
api.protected = true
[resources.apt]
packages = ["python3-venv", "python3-dev", "ffmpeg", "postgresql", "wget", "build-essential", "libreadline-dev", "libncursesw5-dev", "libssl-dev", "libsqlite3-dev", "tk-dev", "libgdbm-dev", "libc6-dev", "libbz2-dev", "libffi-dev", "zlib1g-dev"]
packages = ["python3-venv", "python3-dev", "ffmpeg", "postgresql", "wget", "build-essential", "libreadline-dev", "libncursesw5-dev", "libssl-dev", "libsqlite3-dev", "tk-dev", "libgdbm-dev", "libc6-dev", "libbz2-dev", "libffi-dev", "zlib1g-dev", "unzip"]
extras.postgresql.repo = "deb https://apt.postgresql.org/pub/repos/apt bullseye-pgdg main 16"
extras.postgresql.key = "https://www.postgresql.org/media/keys/ACCC4CF8.asc"

View file

@ -207,6 +207,17 @@ myynh_install_immich() {
# Cleanup
ynh_secure_remove --file="$tmpdir"
# Install geonames
wget --output-document="$install_dir/resources/cities500.zip" \
"https://download.geonames.org/export/dump/cities500.zip" 2>&1
unzip "$install_dir/resources/cities500.zip" -d "$install_dir/resources/"
ynh_secure_remove --file="$install_dir/resources/cities500.zip"
wget --output-document="$install_dir/resources/admin1CodesASCII.txt" \
"https://download.geonames.org/export/dump/admin1CodesASCII.txt" 2>&1
wget --output-document="$install_dir/resources/admin2Codes.txt" \
"https://download.geonames.org/export/dump/admin2Codes.txt" 2>&1
date --iso-8601=seconds | tr -d "\n" > "$install_dir/resources/geodata-date.txt"
# Fix permissisons
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"