#!/bin/sh
PRIVATE_LOCATION="/var/packages/Calendar/target"

updatePortConfig()
{
    /usr/syno/sbin/synopkghelper update Calendar port-config
}

updatePortConfig

# <Calendar> #2264 stop_package may not be executed correcly when abnormal shutdown
# this file will cause Calendar can not be repaired after upgrading to DSM7
NGINX_CONF_DIR1="/usr/local/etc/nginx/sites-enabled"
[ -f "$NGINX_CONF_DIR1/calendar-nginx.conf" ] && rm -f "$NGINX_CONF_DIR1/calendar-nginx.conf"

NGINX_CONF_DIR2="/usr/local/etc/nginx/conf.d/"
[ -f "$NGINX_CONF_DIR2/www.Calendar.conf" ] && rm -f "$NGINX_CONF_DIR2/www.Calendar.conf"

exit 0
