SynoCommunity/spksrc — pull request #755 by Dr-Bean (2013-12-04 17:22:07+00:00)
Title: spksrc: Add Firewall/port-forwarding support

Proposal for adding firewall support into spksrc.
See "Install Package Related Ports Information into DSM" of Synology Developers Guide for background and more info on .sc-file contents.

Usage:
Makefile
- Add FWPORTS = src/${SPK_NAME}.sc
Installer.sh
- Add var FWPORTS="/var/packages/${PACKAGE}/scripts/${PACKAGE}.sc"
- Add var SERVICETOOL="/usr/syno/bin/servicetool"
- In postinst (), add:
# Add port-forwarding config
${SERVICETOOL} --install-configure-file --package ${FWPORTS}
- In preuninst (), add:
# Remove port-forwarding config
if [ "${SYNOPKG_PKG_STATUS}" == "UNINSTALL" ]; then
${SERVICETOOL} --remove-configure-file --package ${PACKAGE}.sc
fi