#!/bin/sh
# Copyright (c) 2000-2014 Synology Inc. All rights reserved.

. `dirname $0`/common
# DSM 4 use different config
if [ "$SYNOPKG_DSM_VERSION_MAJOR" -eq "4" ]; then
	SITES_ENABLED_USER_DIR="/usr/syno/etc/sites-enabled-user"
	ApacheUserScript="/usr/syno/etc/rc.d/S97apache-user.sh"

	if [ -d $SITES_ENABLED_USER_DIR ]; then
	   rm $SITES_ENABLED_USER_DIR"/SYNO.SDS.Moodle.conf"
	   $ApacheUserScript restart > /dev/null 2>&1
	fi
else
	PHP_CONF_DIR="/etc/php/conf.d"
	
	rm $PHP_CONF_DIR"/SYNO.SDS.Moodle.ini"
	initctl restart php-fpm > /dev/null 2>&1
fi

exit 0
