From 2c5e59120c2cb5cf95144481ad8d6f94b1dfc3e1 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sun, 16 May 2021 17:03:46 +0200 Subject: [PATCH] minor fix install script --- config/etc/scodoc.service | 8 ++++---- config/install_debian10.sh | 8 +++++--- config/save_scodoc_data.sh | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/config/etc/scodoc.service b/config/etc/scodoc.service index 927420fc5..89a63e138 100644 --- a/config/etc/scodoc.service +++ b/config/etc/scodoc.service @@ -5,9 +5,9 @@ # [Unit] Description=ScoDoc 7 service -After=network.target postgresql@11-main.service -Requires=postgresql@11-main.service -PartOf=postgresql@11-main.service +After=network.target postgresql +Requires=postgresql +PartOf=postgresql StartLimitIntervalSec=0 [Service] @@ -21,4 +21,4 @@ ExecStop=/opt/scodoc/bin/zopectl stop ExecReload=/opt/scodoc/bin/zopectl restart [Install] -WantedBy=postgresql@11-main.service +WantedBy=postgresql diff --git a/config/install_debian10.sh b/config/install_debian10.sh index a7a6cd793..3494d793e 100755 --- a/config/install_debian10.sh +++ b/config/install_debian10.sh @@ -32,11 +32,13 @@ fi chgrp www-data $SCODOC_DIR $SCODOC_DIR/ZopeProducts/* chmod g+w $SCODOC_DIR $SCODOC_DIR/ZopeProducts/* -chgrp -R www-data "${SCODOC_VAR_DIR}"/photos -chmod -R g+w "${SCODOC_VAR_DIR}"/photos +if [ -d "${SCODOC_VAR_DIR}"/photos ]; then + chgrp -R www-data "${SCODOC_VAR_DIR}"/photos + chmod -R g+w "${SCODOC_VAR_DIR}"/photos +fi if [ ! -e "${SCODOC_VERSION_DIR}" ]; then - mkdir "${SCODOC_VERSION_DIR}" + mkdir -p "${SCODOC_VERSION_DIR}" chown www-data.www-data "${SCODOC_VERSION_DIR}" fi diff --git a/config/save_scodoc_data.sh b/config/save_scodoc_data.sh index 389ed16c3..24d876aef 100755 --- a/config/save_scodoc_data.sh +++ b/config/save_scodoc_data.sh @@ -51,7 +51,7 @@ then fi chown root "$DEST" -# Zope DB and ScoDoc archives: +# Zope DB, ScoDoc archives, configuration, photos, etc. echo "Copying var/ ..." cp -rp "$INSTANCE_DIR/var" "$DEST"