Hello,

Maybe I am approaching this from the wrong direction. I've been trying to call an As/400 program from tn5250. The program is nothing but a CL command that restarts our web server. What I am trying to do is I have a network monitoring system here that runs on my Linux box. When the monitor detects something wrong with the web server I can get it to call a shell script. This shell script then calls tn5250 to run my CL program on the As/400. When I execute the shell script from a shell this seems to work fine. I have tried running the shell script from the monitor program and as a cron job but they both seem to just ignore the tn5250 auto command. Is it just the fact that tn5250 will not run without an actual shell present?

Does anyone have any experience doing this kind of thing?
Is their another or better way to run an As/400 command from a Linux box?

Any help would be appreciated.

tn5250rc:

auto {
host = as400-2
+ruler
env.USER = DUMMY
env.IBMSUBSPW = DUMMY
env.IBMPROGRAM = RSTWEBB
env.IBMCURLIB = SCHUA
}

shell script
#!/bin/sh
service=$1
status=$2

if [ "$service" = "HTTP-ADS" ] ;
then
       if [ "$status" = "CRITICAL" ] ;
       then
               tn5250 auto
       fi
fi

--
Andy Schultz
http://www.grgeek.com

_______________________________________________
This is the Linux 5250 Development Project (LINUX5250) mailing list
To post a message email: [EMAIL PROTECTED]
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/linux5250
or email: [EMAIL PROTECTED]
Before posting, please take a moment to review the archives
at http://archive.midrange.com/linux5250.



Reply via email to