#!/bin/sh

PATH=../../../daemon:../../../coss/naming:../../../coss/property:../../../imr:../../../ir:$PATH
MICORC=/dev/null
export MICORC

ADDR=inet:`uname -n`:9901

#
# Register Naming Service
#
echo "Starting Naming Service..."
nsd -ORBIIOPAddr $ADDR &
nsd_pid=$!

sleep 2

#
# Run Property Service Demon
#
echo "Starting Property Service Daemon..."
propertyd -ORBNamingAddr $ADDR -ORBIIOPAddr inet:localhost:12000 &
pd_pid=$!
#trap "kill $nsd_pid $pd_pid > /dev/null 2> /dev/null" 0
trap "kill $nsd_pid $pd_pid" 0
sleep 2

#
# Create Properties
#

echo '>' Create Properties
echo '>'

./set_properties -ORBNamingAddr $ADDR

#
# Read Properties
#

echo '>' Read Properties
echo '>'

./get_properties -ORBNamingAddr $ADDR
