Sponsored Content
Top Forums Shell Programming and Scripting Exit script when shutdown or reboot command is given Post 302880748 by maverick72 on Monday 23rd of December 2013 05:58:12 AM
Old 12-23-2013
The OS will terminate the process but if you wanna be clean about this you should handle your application through services management.

- Start script
- Stop script
- Add service

That way when the system boots it will check all the services that need to be started and start your application automaticly. Same thing while your system shuts down it will check all the services to end and will terminate your application cleanly.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

using exit command in a shell script

Can it be done? If so, how? I would like a script to contain the exit command, and log me off at script completion. thanks (1 Reply)
Discussion started by: jpprial
1 Replies

2. UNIX for Dummies Questions & Answers

Shutdown and Reboot problem

Hi, i have sco openserver 5.0.6 but have a problem with shutdown or reboot commands. The string I use is "shutdown -g0 -y" but the system just hangs on "The sytem is down" . I used to get a "Safe to turn of" but now nothing. Same with "reboot" the sytem just freezes. Any suggestions? (1 Reply)
Discussion started by: VTechman
1 Replies

3. Shell Programming and Scripting

How to control/overide shutdown/reboot process?

Dear all, I want to control my server from shutting down and rebooting. It will ask for some question before the process, ex: who are you? what is the reason for shutting down? ... I think I can overide that binary of shutdown/reboot command, but it is confused. We have many way to... (5 Replies)
Discussion started by: fongthai
5 Replies

4. UNIX for Advanced & Expert Users

Emdedding my script in to exit command

Hi, How can I call my shell script, when I execute 'exit' command? For eg. I am logging out the root login by 'exit' command. My script 'colinfo' shold execute before logging out. I don't want to use any wrapper script. (2 Replies)
Discussion started by: sharif
2 Replies

5. UNIX for Advanced & Expert Users

shutdown and reboot unix server

Hi, please could someone advise the best command to shutdown and then for it to reboot back online again. Note: I shall be doing this from a telent session. regards venhart (3 Replies)
Discussion started by: venhart
3 Replies

6. UNIX for Advanced & Expert Users

Multiple ssh, shutdown and exit script

PROBLEM: I need to ssh into multiple remote machines, send a shutdown command and exit. The remote servers will then run their own scripts to gracefully shutdown their applications before shutting down. ONE: This is to be achieved without using public key authentication; this is being avoided... (2 Replies)
Discussion started by: ulemsee
2 Replies

7. 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

8. Linux

Reboot/Shutdown messages

Hi, I'm using 2.6.11 kernel on ARM 9. Below are the messages I get issuing different commands. When I give "reboot" I get run level 6 initiated and get the following messages. I have nothing to complaint about it. All the scripts in rc6.d are executed. The system is going down for reboot... (3 Replies)
Discussion started by: suryaemlinux
3 Replies

9. Shell Programming and Scripting

How to get the exit status of a command in nner script to the outer script?

Hi all, I have a shell script inside which i am executing another shell script. In the inner script im executing a command. i want the status of that command in the outer script to perform some validations. How to get its status please help!!1 Im using ksh. (2 Replies)
Discussion started by: Jayaraman
2 Replies

10. Shell Programming and Scripting

Issue with shutdown command in script (MacOS High Sierra)

Hello, I have a backup script that runs an rsync backup to an external drive. I use the script frequently on Windows and Linux and have installed it on a Mac. The script has an option to run shutdown after the backup has completed. Since backup can take hours to run, this is an option that is... (10 Replies)
Discussion started by: LMHmedchem
10 Replies
GNUNET-ARM(1)						      General Commands Manual						     GNUNET-ARM(1)

NAME
gnunet-arm - control GNUnet services SYNOPSIS
gnunet-arm [options] DESCRIPTION
gnunet-arm can be used to start or stop GNUnet services, including the ARM service itself. The ARM service is a supervisor for GNUnet's service processes. ARM starts services on-demand or as configured and re-starts them if they crash. OPTIONS
-c FILENAME, --config=FILENAME Use the configuration file FILENAME. -e, --end Shutdown all GNUnet services (including ARM itself). Running "gnunet-arm -e" is the usual way to shutdown a GNUnet peer. -h, --help Print short help on options. -L LOGLEVEL, --loglevel=LOGLEVEL Use LOGLEVEL for logging. Valid values are DEBUG, INFO, WARNING and ERROR. -i SERVICE, --init=SERVICE Starts the specified SERVICE if it is not already running. More specifically, this makes the service behave as if it were in the default services list. -k SERVICE, --kill=SERVICE Stop the specified SERVICE if it is running. While this will kill the service right now, the service may be restarted immediately if other services depend on it (service is then started 'on-demand'). If the service used to be a 'default' service, its default- service status will be revoked. If the service was not a default service, it will just be (temporarily) stopped, but could be re- started on-demand at any time. -s, --start Start all GNUnet default services on this system (and also ARM). Naturally, if a service is demanded by a default service, it will then also be started. Running "gnunet-arm -s" is the usual way to start a GNUnet peer. -I, --info List all running services. -v, --version Print GNUnet version number. BUGS
Report bugs by using Mantis <https://gnunet.org/bugs/> or by sending electronic mail to <gnunet-developers@gnu.org> SEE ALSO
gnunet-service-arm(1) GNUnet Jan 4, 2012 GNUNET-ARM(1)
All times are GMT -4. The time now is 02:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy