Hi,
the user entry inside the agent config is not everytimes succesfull ;-). had and agents are running with userid 0, but not root (this is sometimes not identical).
Possible is here: inside your online script you have to start the real start command in a su environment:
su - root -c "command arguments"
The "su - root" is only possible because had and the agents are runnung in background with user id 0. With every other user environment you would have to provide a password with the "su -" command. (And, no, the password cannot be given with a herescript like everything until <<EOF)
Maybe you have to source some environment files too:
su - root -c ". /.profile; . /etc/<applcationprofile>; command arguments"
So inside the online script you change your identification to userid 0 AND the username root and fire your application start command.
In simple configurations it is possible to call this "" su - root -c ". /.profile; . /etc/<applcationprofile>; command arguments" "" thing directly from the StartProgram attribute of the application agent. But I remember some issues with the " and ' and shell substitution which i cannot recall :( Make some tries (remember the \ in VCS is %) there is a way!
Good Luck
PS: sorry, forgot your question about starting as root and monitoring as someone else: sure you can monitor your application as any user as long as you don't need root rights to carry out the monitoring :-). Application agent is written for such situations. You can run yout online, offline, minitor, clean in any context the app is providing, as long as you don't get in trouble with the operating system rights management. But maybe it is neccessary to be root also for STOPPING the app. Then you have the same procedure again ...
Message Edited by Roger Zimmermann on
11-20-2007 05:27 AM