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

PKG_DIR="Joomla_2.5.6"
WEB_DIR="/var/services/web/joomla"

tmp_path=/$(readlink /var/services/web|cut -d/ -f 2)/@tmp
cp -r $tmp_path/joomla/$PKG_DIR/* $WEB_DIR
rm -r $tmp_path/joomla/$PKG_DIR

chown -R nobody:nobody $WEB_DIR

if [ -f $WEB_DIR/configuration.php ]; then
	rm -r $WEB_DIR/installation
fi

exit 0
