File: //var/packages/WebStation/scripts/start-stop-status
#!/bin/bash
case "$1" in
start)
if [ ! -L /usr/syno/etc/www/WebStation.json ]; then
/usr/bin/rm -f /usr/syno/etc/www/WebStation.json
/usr/bin/ln -sf /usr/syno/etc/packages/WebStation/WebStation.json /usr/syno/etc/www/WebStation.json
fi
/var/packages/WebStation/target/tools/synowebservice plugin-pkg sync-all
"${SYNOPKG_PKGDEST}/tools/webstation_update_php_timezone.sh"
/var/packages/WebStation/target/tools/synowebservice service sync
/var/packages/WebStation/target/tools/synowebservice portal force-sync
;;
stop)
/usr/syno/bin/synow3tool --disable-nginx-sites=server.webstation.conf,server.webstation-vhost.conf
/usr/syno/bin/synow3tool --disable-nginx-confd=.location.webstation.conf
/usr/bin/rm -f /usr/syno/etc/www/WebStation.json
/var/packages/WebStation/target/tools/synowebservice portal sync
;;
status)
exit 0
esac