#!/bin/sh
# Copyright (C) 2000-2001 Open Source Telecom Corporation.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
#
# a wrapper for starting of hosted servers

if test "$UID" == "0" ; then
	if test -z "$*" ; then
		echo "use: baystart user [options]"
		exit -1
	fi
	shift 
	exec su $1 -c "$0 $*"
fi

if test ! -d $HOME/conf ; then
	echo "baystart: no user hosted local config directory"
	exit -1
fi

export KEYDATA=~/conf
exec bayonne $KEYDATA $*


