#!/bin/sh

if [ -n "$PLESK_INSTALLER_DEBUG" -o -n "$PLESK_INSTALLER_VERBOSE" ]; then
	set -x;
fi

prefix=""
root_d="/usr/local/psa"
install_d="$root_d/admin/sbin"
link_d="$root_d/admin/bin"
tmpdir="$root_d/tmp"

prog="`basename $0`"
mu="`echo $prog | awk -F '-' '{print $1}'`"

restorecmd=":"
which restorecon > /dev/null
if [ $? = 0 ]; then
        restorecmd="restorecon"
fi

[ ! -s "$link_d/vhostmng-structure" ] \
	&& cd $root_d/admin/bin \
	&& ln -s ../sbin/wrapper $link_d/vhostmng-structure \
	&& chown -h psaadm:psaadm $link_d/vhostmng-structure

[ ! -s "$link_d/bin/vhostmng-content" ] \
	&& cd $root_d/admin/bin \
	&& ln -s ../sbin/wrapper $link_d/vhostmng-content \
	&& chown -h psaadm:psaadm $link_d/vhostmng-content

exit 0
