minor fix install script

This commit is contained in:
Emmanuel Viennet 2021-05-16 17:03:46 +02:00
parent e52ffb8357
commit 2c5e59120c
3 changed files with 10 additions and 8 deletions

View File

@ -5,9 +5,9 @@
# #
[Unit] [Unit]
Description=ScoDoc 7 service Description=ScoDoc 7 service
After=network.target postgresql@11-main.service After=network.target postgresql
Requires=postgresql@11-main.service Requires=postgresql
PartOf=postgresql@11-main.service PartOf=postgresql
StartLimitIntervalSec=0 StartLimitIntervalSec=0
[Service] [Service]
@ -21,4 +21,4 @@ ExecStop=/opt/scodoc/bin/zopectl stop
ExecReload=/opt/scodoc/bin/zopectl restart ExecReload=/opt/scodoc/bin/zopectl restart
[Install] [Install]
WantedBy=postgresql@11-main.service WantedBy=postgresql

View File

@ -32,11 +32,13 @@ fi
chgrp www-data $SCODOC_DIR $SCODOC_DIR/ZopeProducts/* chgrp www-data $SCODOC_DIR $SCODOC_DIR/ZopeProducts/*
chmod g+w $SCODOC_DIR $SCODOC_DIR/ZopeProducts/* chmod g+w $SCODOC_DIR $SCODOC_DIR/ZopeProducts/*
chgrp -R www-data "${SCODOC_VAR_DIR}"/photos if [ -d "${SCODOC_VAR_DIR}"/photos ]; then
chmod -R g+w "${SCODOC_VAR_DIR}"/photos chgrp -R www-data "${SCODOC_VAR_DIR}"/photos
chmod -R g+w "${SCODOC_VAR_DIR}"/photos
fi
if [ ! -e "${SCODOC_VERSION_DIR}" ]; then if [ ! -e "${SCODOC_VERSION_DIR}" ]; then
mkdir "${SCODOC_VERSION_DIR}" mkdir -p "${SCODOC_VERSION_DIR}"
chown www-data.www-data "${SCODOC_VERSION_DIR}" chown www-data.www-data "${SCODOC_VERSION_DIR}"
fi fi

View File

@ -51,7 +51,7 @@ then
fi fi
chown root "$DEST" chown root "$DEST"
# Zope DB and ScoDoc archives: # Zope DB, ScoDoc archives, configuration, photos, etc.
echo "Copying var/ ..." echo "Copying var/ ..."
cp -rp "$INSTANCE_DIR/var" "$DEST" cp -rp "$INSTANCE_DIR/var" "$DEST"