diff --git a/spk/owncloud/src/conf/privilege b/spk/owncloud/src/conf/privilege index 3f2906691bb..29b1936968e 100644 --- a/spk/owncloud/src/conf/privilege +++ b/spk/owncloud/src/conf/privilege @@ -29,11 +29,9 @@ "run-as": "root" } ], - "tool": { + "executable": { "relpath": "bin/occ-cmd.sh", - "user": "package", - "group": "package", - "permission": "4755" + "run-as": "package" }, "join-groupname": "http" } diff --git a/spk/owncloud/src/service-setup.sh b/spk/owncloud/src/service-setup.sh index c2a8d34ff30..77e1438fce6 100755 --- a/spk/owncloud/src/service-setup.sh +++ b/spk/owncloud/src/service-setup.sh @@ -265,6 +265,7 @@ service_postuninst () ${MKDIR} ${TEMPDIR} WS_CFG_PATH="/usr/syno/etc/packages/WebStation" PHP_CFG_FILE="PHPSettings.json" + CFG_UPDATE="no" # Check for ownCloud PHP profile if ${JQ} -e '.["com-synocommunity-packages-owncloud"]' "${WS_CFG_PATH}/${PHP_CFG_FILE}" >/dev/null; then echo "Removing PHP profile for ownCloud" @@ -272,13 +273,19 @@ service_postuninst () ${MV} ${WS_CFG_PATH}/${PHP_CFG_FILE} ${WS_CFG_PATH}/${PHP_CFG_FILE}.bak rsync -aX ${TEMPDIR}/${PHP_CFG_FILE} ${WS_CFG_PATH}/ 2>&1 ${RM} ${TEMPDIR}/${PHP_CFG_FILE} + CFG_UPDATE="yes" fi # Check for ownCloud Apache config if [ -f "/usr/local/etc/apache24/sites-enabled/owncloud.conf" ]; then echo "Removing Apache config for ownCloud" ${RM} /usr/local/etc/apache24/sites-enabled/owncloud.conf + CFG_UPDATE="yes" + fi + # Restart Apache if configs have changed + if [ "$CFG_UPDATE" = "yes" ]; then + echo "Restart Apache to load new configs" + ${SYNOSVC} --restart pkgctl-Apache2.4 fi - ${SYNOSVC} --restart pkgctl-Apache2.4 fi } diff --git a/spk/owncloud/src/wizard/install_uifile.sh b/spk/owncloud/src/wizard/install_uifile.sh index 3da570313a4..58c36713369 100644 --- a/spk/owncloud/src/wizard/install_uifile.sh +++ b/spk/owncloud/src/wizard/install_uifile.sh @@ -2,13 +2,13 @@ WEB_DIR="/var/services/web_packages" # for backwards compatability -if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 7 ];then +if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 7 ]; then WEB_DIR="/var/services/web" fi OCROOT="${WEB_DIR}/${SYNOPKG_PKGNAME}" DATADIR="/volume1/@appdata/owncloud/data" # for backwards compatability -if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 7 ];then +if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 7 ]; then DATADIR="$(realpath ${WEB_DIR})/${SYNOPKG_PKGNAME}/data" fi diff --git a/spk/owncloud/src/wizard/uninstall_uifile.sh b/spk/owncloud/src/wizard/uninstall_uifile.sh index f0c7f3c116f..e9160046ed5 100644 --- a/spk/owncloud/src/wizard/uninstall_uifile.sh +++ b/spk/owncloud/src/wizard/uninstall_uifile.sh @@ -2,8 +2,14 @@ WEB_DIR="/var/services/web_packages" # for backwards compatability -if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 7 ];then +if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 7 ]; then WEB_DIR="/var/services/web" + if [ -z ${SYNOPKG_PKGDEST_VOL} ]; then + SYNOPKG_PKGDEST_VOL="/volume1" + fi + if [ -z ${SYNOPKG_PKGDEST} ]; then + SYNOPKG_PKGDEST="/var/packages/owncloud/target" + fi fi OCC="${SYNOPKG_PKGDEST}/bin/occ-cmd.sh" DATADIR="$(${OCC} config:system:get datadirectory)" diff --git a/spk/owncloud/src/wizard/upgrade_uifile.sh b/spk/owncloud/src/wizard/upgrade_uifile.sh index 0736ab82f65..09d03823b19 100644 --- a/spk/owncloud/src/wizard/upgrade_uifile.sh +++ b/spk/owncloud/src/wizard/upgrade_uifile.sh @@ -2,7 +2,7 @@ WEB_DIR="/var/services/web_packages" # for backwards compatability -if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 7 ];then +if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 7 ]; then WEB_DIR="/var/services/web" fi OCROOT="${WEB_DIR}/${SYNOPKG_PKGNAME}"