From 42fbbeacea99aa379bf5ebb46faca85b2e500271 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Sun, 29 Sep 2024 15:12:07 -0600 Subject: [PATCH] Update photoprism-install.sh - code cleanup --- photoprism/photoprism-install.sh | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/photoprism/photoprism-install.sh b/photoprism/photoprism-install.sh index 375a41b..ba05dab 100644 --- a/photoprism/photoprism-install.sh +++ b/photoprism/photoprism-install.sh @@ -51,7 +51,6 @@ if [ "${REINSTALL}" == "true" ]; then echo "You did a reinstall, but the ${DB_TYPE} root password AND ${APP_NAME} database password will be changed." echo "New passwords will still be saved in the root directory." mysql -u root -e "SET PASSWORD FOR '${DB_USER}'@localhost = PASSWORD('${DB_PASSWORD}');" - sed -i '' -e "s|.*DatabasePassword:.*|DatabasePassword: ${DB_PASSWORD}|g" /mnt/photos/options.yml fetch -o /root/.my.cnf https://raw.githubusercontent.com/tschettervictor/bsd-apps/main/photoprism/includes/my.cnf sed -i '' "s|mypassword|${DB_ROOT_PASSWORD}|" /root/.my.cnf else @@ -69,6 +68,14 @@ else mysqladmin --user=root password "${DB_ROOT_PASSWORD}" reload fetch -o /root/.my.cnf https://raw.githubusercontent.com/tschettervictor/bsd-apps/main/photoprism/includes/my.cnf sed -i '' "s|mypassword|${DB_ROOT_PASSWORD}|" /root/.my.cnf +fi + +# Install Photoprism +pkg add "${LIBTENSORFLOW_PKG}" +pkg add "${PHOTOPRISM_PKG}" +if [ "${REINSTALL}" == "true" ]; then + sed -i '' -e "s|.*DatabasePassword:.*|DatabasePassword: ${DB_PASSWORD}|g" /mnt/photos/options.yml +else touch /mnt/photos/options.yml cat >/mnt/photos/options.yml <