Application Script didn't run during AIX shutdown using RC directories
Hi,
I am trying to bring down the application gracefully before bringing down AIX OS/LPAR using RC directories.
Issue: Application script is not working properly during/before AIX OS/LPAR shutdown. looks like "rc.d" directories doesn't recognize Kill script.
But Startup script (using rc2.d) is working as expected. When UI reboot the LPAR, as part of "/etc/rc.d/ec2.d/S80app" app script ran in run level 2.
What I have done so far
under "/etc/rc.d"
Created a common script under "/etc/rc.d/init.d/"
app.sh
Scenario 1)
Then
created the symbolic links under "/etc/rc.d/rc2.d"
Result: Not as expected
LPAR was shutdown; stop script ran successfully before shutdown.
But Issue is stop script ran again during LPAR activation/restart as well.
My intention is only to run stop script before shutdown and start script after the lpar restart.
Scenario 2)
under "/etc/rc.d/rc2.d"
and
after reading IBM tech note (ref to step 5 in IBM tech note)
I run the following command using the command line. I need to run the same command in shell script :
./sas.server start
start is a parameter that passes to start.server to startup services within start.server.
the path to sas.server is /path/Lev1
Here is my code:
#!/bin/sh
set... (3 Replies)
Hello,
I have script that start and shutdown the application.
where should i place my script so that it can execute at my OS shutdown ?
Pls help me... (2 Replies)
Hi
I have 100 files under file A labled 1.txt 2.txt.....100.txt(made up name)
I have 1 files under file B labled name.txt
How can i run the same perl script on 100 files and file name.txt
I want to run
perl script.pl A/1.txt B/name.txt
perl script.pl A/2.txt B/name.txt
.......
perl... (3 Replies)
Hi I am working in a java application. I need to execute a perl script(linux) which is in remote machine in java application from local machine(windows). I need to do this process automatically that is without manual intereption. Now I will explain the process clearly, at present to run the... (1 Reply)
In my cronjob, I would like to schedule my script.sh to run every minutes. I crontab -e and have in line below but it didn't seems to run at all.
* * * * * script.sh
When I run it manually, I can run it. Is that anything wrong with the above line?
If I change it to something like below,... (4 Replies)
Hi,
I want to run a Perl script on multiple files, with same name ("Data.txt") but in different directories (eg : 2010_06_09_A/Data.txt, 2010_06_09_B/Data.txt).
I know how to run this perl script on files in the same directory like:
for $i in *.txt
do
perl myscript.pl $i > $i.new... (8 Replies)
Stop the application before shutdown the server ..
I have application need to be started with the system and also need to be stop before shutdown the system
This is the path of the application:
/usr/appstart
/usr/appstop
to start the application with the startup of the... (2 Replies)
I'm trying to do some cleanup (write open files) when Linux shuts down. I thought the right method would be to trap SIGTERM and do the necessary processing. Here's my sample code:
#include <stdio.h> // for File I/O
#include <signal.h> // for signals
#include <unistd.h> // for sleep()
void... (6 Replies)
I have a ksh script that does a bunch of things, then runs
telnet server_b
I then manually login, manually run one command (which launches an application with display back to my workstation), then logout at which point the main script takes back over, runs something else, then ends.
Is... (4 Replies)