diff --git a/spk/memcached/src/service-setup.sh b/spk/memcached/src/service-setup.sh index 0d8cc0cc697b..05e254905d61 100644 --- a/spk/memcached/src/service-setup.sh +++ b/spk/memcached/src/service-setup.sh @@ -7,6 +7,7 @@ PATH="${SYNOPKG_PKGDEST}/bin:/usr/local/bin:/bin:/usr/bin:/usr/syno/bin" MEMCACHED="${SYNOPKG_PKGDEST}/bin/memcached" SERVICE_COMMAND="${MEMCACHED} -d -m `awk '/MemTotal/{memory=$2/1024*0.15; if (memory > 64) memory=64; printf "%0.f", memory}' /proc/meminfo` -P ${PID_FILE}" CONFIG_DIR="${WEB_DIR}/phpMemcachedAdmin/Config" +CONFIG_FILE="${CONFIG_DIR}/Memcache.php" CONFIG_BACKUP="${TMP_DIR}/Config" service_postinst () @@ -22,13 +23,13 @@ service_postinst () fi if [ "${SYNOPKG_PKG_STATUS}" == "INSTALL" ]; then - cp -pv "${CONFIG_DIR}/Memcache.sample.php" "${CONFIG_DIR}/Memcache.php" + cp -v "${CONFIG_DIR}/Memcache.sample.php" "${CONFIG_FILE}" chgrp http "${CONFIG_FILE}" chmod g+w "${CONFIG_FILE}" elif [ -d "${CONFIG_BACKUP}" ]; then tar -cf - -C "${CONFIG_BACKUP}" --exclude="Memcache.sample.php" . | tar -xvf - -C "${CONFIG_DIR}" else - cp -pv "${CONFIG_DIR}/Memcache.sample.php" "${CONFIG_DIR}/Memcache.php" + cp -v "${CONFIG_DIR}/Memcache.sample.php" "${CONFIG_FILE}" chgrp http "${CONFIG_FILE}" chmod g+w "${CONFIG_FILE}" fi