<?xl version="1.0" encoding="Shift_JIS" ?>

<Define> ^st_arg 1 </Define>
<Load option="exec"> xlconf/std/agent.xl </Load>



<Switch>
<Case> (= (Arg st_arg) "start")
	<Load option="exec"> xlscript/std/xlserver.xl </Load>
	(Shell "gbmp xlscript/gbs/mp.xl &amp;")
</Case>
<Case> (= (Arg st_arg) "stop")

	<Load option="exec"> xlconf/std/root.passwd.xl </Load>

	<ErrHandler><Define> ^id
	   <OpenInterpreter>
		connect
		<CurrentEnvironment/>
		<Port> ^MPPort </Port>
		<HostName>localhost</HostName>
	   </OpenInterpreter>
	</Define></ErrHandler>
	<ErrHandler><Remote> ^id
	   <SetAgent> server root</SetAgent>
	</Remote></ErrHandler>
	<ErrHandler><Remote> ^id <Exit/> </Remote></ErrHandler>

	<Sleep> 5 </Sleep>

	<ErrHandler><Define> ^id
	   <OpenInterpreter>
		connect
		<CurrentEnvironment/>
		<Port> ^MPPort </Port>
		<HostName>localhost</HostName>
	   </OpenInterpreter>
	</Define></ErrHandler>
	<ErrHandler><Remote> ^id
	   <SetAgent> server root</SetAgent>
	</Remote></ErrHandler>
	<ErrHandler><Remote> ^id <Exit/> </Remote></ErrHandler>

	<Load option="exec"> xlscript/std/xlserver.xl </Load>
</Case>
</Switch>

