Skip to content

Commit c5ba949

Browse files
authored
Update photoprism-install.sh (#1639)
1 parent 6e0527d commit c5ba949

File tree

1 file changed

+29
-19
lines changed

1 file changed

+29
-19
lines changed

install/photoprism-install.sh

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,35 @@ network_check
1414
update_os
1515

1616
msg_info "Installing Dependencies (Patience)"
17-
$STD apt-get install -y curl
18-
$STD apt-get install -y sudo
19-
$STD apt-get install -y mc
20-
$STD apt-get install -y exiftool
21-
$STD apt-get install -y ffmpeg
22-
$STD apt-get install -y libheif1
23-
$STD apt-get install -y libpng-dev
24-
$STD apt-get install -y libjpeg-dev
25-
$STD apt-get install -y libtiff-dev
26-
$STD apt-get install -y imagemagick
27-
$STD apt-get install -y darktable
28-
$STD apt-get install -y rawtherapee
29-
$STD apt-get install -y libvips42
17+
$STD apt-get install -y \
18+
curl \
19+
sudo \
20+
mc \
21+
exiftool \
22+
ffmpeg \
23+
libheif1 \
24+
libpng-dev \
25+
libjpeg-dev \
26+
libtiff-dev \
27+
imagemagick \
28+
darktable \
29+
rawtherapee \
30+
libvips42
3031

3132
echo 'export PATH=/usr/local:$PATH' >>~/.bashrc
3233
export PATH=/usr/local:$PATH
3334
msg_ok "Installed Dependencies"
3435

3536
msg_info "Installing PhotoPrism (Patience)"
36-
mkdir -p /opt/photoprism/{cache,config,photos/originals,photos/import,storage,temp}
37+
mkdir -p /opt/photoprism/{cache,config,photos,storage,temp}
38+
mkdir -p /opt/photoprism/photos/{originals,import}
39+
mkdir -p /opt/photoprism_backups
3740
wget -q -cO - https://dl.photoprism.app/pkg/linux/amd64.tar.gz | tar -xz -C /opt/photoprism --strip-components=1
38-
if [[ ${PCT_OSTYPE} == "ubuntu" ]]; then
39-
wget -q -cO - https://dl.photoprism.app/dist/libheif/libheif-jammy-amd64-v1.17.1.tar.gz | tar -xzf - -C /usr/local --strip-components=1
40-
else
41-
wget -q -cO - https://dl.photoprism.app/dist/libheif/libheif-bookworm-amd64-v1.17.1.tar.gz | tar -xzf - -C /usr/local --strip-components=1
42-
fi
41+
LIBHEIF_URL=$(wget -q -O - "https://dl.photoprism.app/dist/libheif/" | grep -oP "libheif-$(lsb_release -cs)-amd64-v[0-9\.]+\.tar\.gz" | sort -V | tail -n 1)
42+
wget -q -cO - "https://dl.photoprism.app/dist/libheif/$LIBHEIF_URL" | tar -xzf - -C /usr/local --strip-components=1
4343
ldconfig
44+
chown -R /opt/photoprism/photos/originals
45+
chmod -R 755 /opt/photoprism/photos/originals
4446
cat <<EOF >/opt/photoprism/config/.env
4547
PHOTOPRISM_AUTH_MODE='password'
4648
PHOTOPRISM_ADMIN_PASSWORD='changeme'
@@ -50,6 +52,14 @@ PHOTOPRISM_SITE_CAPTION='https://Helper-Scripts.com'
5052
PHOTOPRISM_STORAGE_PATH='/opt/photoprism/storage'
5153
PHOTOPRISM_ORIGINALS_PATH='/opt/photoprism/photos/originals'
5254
PHOTOPRISM_IMPORT_PATH='/opt/photoprism/photos/import'
55+
PHOTOPRISM_BACKUP_PATH='/opt/photoprism_backups'
56+
PHOTOPRISM_DATABASE_DRIVER='sqlite'
57+
PHOTOPRISM_DISABLE_WEBDAV='false'
58+
PHOTOPRISM_DISABLE_FACES='false'
59+
PHOTOPRISM_AUTO_INDEX='300'
60+
PHOTOPRISM_AUTO_IMPORT='-1'
61+
PHOTOPRISM_PUBLIC='false'
62+
PHOTOPRISM_DEBUG='false'
5363
EOF
5464
ln -sf /opt/photoprism/bin/photoprism /usr/local/bin/photoprism
5565
msg_ok "Installed PhotoPrism"

0 commit comments

Comments
 (0)