stop application befor shutdown


 
Thread Tools Search this Thread
Operating Systems AIX stop application befor shutdown
# 1  
Old 03-27-2010
stop application befor shutdown

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 system I have mentioned this path /usr/appstart in this file /etc/rc

but my question is ?

how to can I let the system stop my application before shutdown

I mean if I type shutdown I want the system to stop this application /usr/appstopbefore shutdown the server .

is there any file similar rc file need to mentioned that path in it to stop it before start shutdown process .


Pls advice ...
# 2  
Old 03-27-2010
You can put that command in /etc/rc.shutdown and it will do what you want. Check out 'man shutdown' for more info.
# 3  
Old 03-28-2010
vi /etc/rc

######## Application start script #################
/usr/appstart



vi /etc/rc.shutdown

######## Application stop script #################
/usr/appstop



Many thanks ....
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

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... (0 Replies)
Discussion started by: System Admin 77
0 Replies

2. UNIX for Dummies Questions & Answers

Shell Scripting Stop/Start Application

I did a search of these forums but couldnt find a suitable resolution. I am attempting to script a stop and start of an application on AIX. Such as: However it has authentication where username and password prompts will appear after running the above command requiring input from a... (2 Replies)
Discussion started by: Soupy
2 Replies

3. Solaris

Need help "application start up & shutdown"

Hello, i have an application,say X application. When the machine is start-up,i want this application is the last module/application to run & when I shutdown the machine i want this application to be the 1st one to shutdown! i.e. last >>start-up 1st >>shutdown Any help? (1 Reply)
Discussion started by: ahmedamer12
1 Replies

4. AIX

Please update inittab/rc.shutdown/rc scripts to start/stop mqm (need help Urgent)

HI i need help from seniors on this issue, i need to know how to do this, i need to update 50+ server starting saturday. below is the ticket which i have with full description. Currently MQ Series must be stopped before and started after any reboot. Not having the start/stop as part of... (2 Replies)
Discussion started by: gulamibrahim
2 Replies

5. UNIX for Dummies Questions & Answers

Script to force Oracle database shutdown when shutdown immediate does not work

I have Oracle 9i R2 on AIX 5.2. My Database is running in shared server mode (MTS). Sometimes when I shutdown the database it shutsdown cleanly in 4-5 mints and sometimes it takes good 15-20 minutes and then I get some ora-600 errors and only way to shutdown is by opening another session and... (7 Replies)
Discussion started by: aixhp
7 Replies

6. Programming

Application Cleanup during Linux Shutdown

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)
Discussion started by: whatisron
6 Replies

7. Red Hat

Problem with Stop Script during shutdown of o/s

Friends , I create two script for oracle database startup and shutdown . $ cat start.sh ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 ORACLE_OWNER=oracle su - oracle << ! sqlplus / as sysdba << ! startup $ cat stop.sh ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1... (1 Reply)
Discussion started by: shipon_97
1 Replies

8. Post Here to Contact Site Administrators and Moderators

Then user who loged in befor 5 minutes

hi i am a student, i want to know how to display the users who loged in before 5 minutes, in uinx pls reply me immediately (0 Replies)
Discussion started by: roshni
0 Replies

9. Shell Programming and Scripting

Start and stop of an application thru shell scripts.

Hi, I just learnt the shell scripting and got working on that right now. I have one problem. Here i am having a java application that needs to be start and stop using two shell scripts, i.e., starting the java application using one shell script and stopping the application using another... (1 Reply)
Discussion started by: sadha
1 Replies
Login or Register to Ask a Question