Skip to content

Commit

Permalink
Revert "Revert to previous shared folder behavior DSM6"
Browse files Browse the repository at this point in the history
This reverts commit 85f8a51.
  • Loading branch information
publicarray committed Aug 31, 2021
1 parent c56145f commit dc2f720
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
24 changes: 0 additions & 24 deletions mk/spksrc.service.installer.dsm6
Original file line number Diff line number Diff line change
Expand Up @@ -305,30 +305,6 @@ postinst ()
synogroup --rebuild all 2>&1 | install_log
fi

# Share management
if [ -n "${SHARE_PATH}" ]; then
install_log "Configuring ${SHARE_PATH}"
# Create share if does not exist
# !"#$%&’()*+,/:;<=>?@[]nˆ`{} |
if ! synoshare --get "${SHARE_NAME}" &> /dev/null; then
synoshare --add "${SHARE_NAME}" "${SHARE_DESC}" "${SHARE_PATH}" "" "rw" "" 1 0 2>&1 | install_log
fi

# Add user permission if no GROUP is set in UI
# GROUP permission will be added in set_syno_permissions
if [ ! -n "$GROUP" ] && [ -n "${EFF_USER}" ]; then
synoshare --setuser "${SHARE_NAME}" RW + "${EFF_USER}" 2>&1 | install_log
fi
synoshare --build 2>&1 | install_log

$MKDIR "${SHARE_PATH}"

# Permissions for folder, up to volume
if [ -n "$GROUP" ]; then
set_syno_permissions "${SHARE_PATH}" "${GROUP}" 2>&1 | install_log
fi
fi

$MKDIR "${SYNOPKG_PKGVAR}" 2>&1 | install_log

call_func "service_postinst" install_log
Expand Down
2 changes: 1 addition & 1 deletion mk/spksrc.service.mk
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ ifneq ($(strip $(SPK_USR_LOCAL_LINKS)),)
endif
ifneq ($(strip $(SERVICE_WIZARD_SHARE)),)
# e.g. SERVICE_WIZARD_SHARE=wizard_download_dir
ifeq ($(call version_ge, ${TCVERSION}, 7.0),1)
ifeq ($(call version_ge, ${TCVERSION}, 6.0),1)
@jq --arg share "{{${SERVICE_WIZARD_SHARE}}}" --arg user sc-${SPK_USER} \
'."data-share" = {"shares": [{"name": $$share, "permission":{"rw":[$$user]}} ] }' $@ | sponge $@
endif
Expand Down
4 changes: 4 additions & 0 deletions spk/sabnzbd/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ service_postinst ()
mkdir -p "${shared_folder}/watch"
fi

# add group (DSM6)
if [ "${SYNOPKG_DSM_VERSION_MAJOR}" -lt 7 ]; then
set_syno_permissions "${wizard_volume:=/volume1}/${wizard_download_dir:=downloads}" "${GROUP}"
fi

# Install nice/ionice
${BIN}/busybox --install ${BIN}
Expand Down

0 comments on commit dc2f720

Please sign in to comment.