Bjvrn Eklund wrote: > I've decided to make an new start script for Unidata that > includes startud and the start command of my program.
Bjvrn, That would be what I'd do, sort of. Usually I set up a script in /etc/init.d to start and stop unidata cleanly, and then I link to it from the appropriate /etc/rc?.d directories, and for good measure put a script in /usr/local/bin which I whack higher in the PATH than $UDTBIN which intercepts any startud or stopud commands and pushes them through my /etc/init.d/unidata script. By doing this, I make a decent fist of driving any normal mechanism for starting or stopping unidata through a single spot so I can do other useful stuff at the same time - like write a message to syslog, or more importantly, make sure that the current RFS archive log file has been copied to the DR server. If someone knows what they are doing they can always get direct access to stopud or startud via $UDTBIN/st...ud, but it isn't often that you'd want to do that. The decision then is whether to put the startup for you phantoms into the same script as the one that starts unidata, or whether to put it in a separate /etc/init.d script and maybe link to it from a higher run level /etc/rc?.d. UniData commands not providing any reliable exit status is very annoying, but it has always been that way I'm afraid. What I usually do is add an extra capability to my /etc/init.d/unidata so that it understand not just the start and stop commands, but also a 'status' command which will use showud and look for a complete daemon set running to determine if it really believes that UniData is running. I then make it exit with a known status so in other scripts I can do: if /etc/init.d/unidata status then # stuff that relies on UniData being up else echo "better start UniData first!" exit 2 fi I'd wrap something this around your phantom initiation commands, and think hard about whether you need some way to shut your phantoms down neatly or is it OK simply to have stopud -f kill them? Cheers, Ken > -----Ursprungligt meddelande----- > Fren: Bjvrn Eklund [mailto:[EMAIL PROTECTED] > anyone who start unibasic programs automatically when you > start unidata? > I would like my a phantom process started each time I run startud. > All tips are welcome. Could cron be a way to go? > We are on ud5.2 and solaris 8. ------- u2-users mailing list [EMAIL PROTECTED] To unsubscribe please visit http://listserver.u2ug.org/