#!/bin/sh
# Prints or select the active profile for a vserver
if [ $# != 1 -a $# != 2 ] ; then
	echo vprofile vserver [ profile-name ]
else
	if [ ! -f /etc/vservers/$1.conf ] ; then
		echo vserver $1 does not exist >&2
	else
		unset PROFILE
		. /etc/vservers/$1.conf
		if [ $# = 1 ] ; then
			echo PROFILE=$PROFILE
		elif [ $# = 2 ] ; then
			grep .\*\) /etc/vservers/$1.conf
		fi
	fi
fi


