I want to shutdown the application, when system is going down, where will mention

Answer Posted / manavalan

Create service script in SysV init runlevel(Boot Time).

Sample Script,

#!/bin/sh
#
# /etc/init.d/mysystem
# Subsystem file for "MySystem" server
#
# chkconfig: 2345 95 05
# description: MySystem server daemon

processname: MySystem
config: /etc/MySystem/mySystem.conf
config: /etc/sysconfig/mySystem
pidfile: /var/run/MySystem.pid
# source function library
. /etc/rc.d/init.d/functions
# pull in sysconfig settings
[ -f /etc/sysconfig/mySystem ] && . /etc/sysconfig/mySystem
RETVAL=0
prog="MySystem"

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How secured is linux? Explain.

462


Compare linux with windows?

462


What does grep() stand for?

474


How is linux more secure compared to other operating systems?

442


Why do hackers prefer linux?

480






Can linux get viruses?

452


How to enable root logging in ubuntu?

466


What linux do hackers use?

446


Can a linux docker container run on windows?

445


If a volume group named vg0 already exists and we need to extend this volume group up to 4gb. How will you do it?

465


What is posix in linux?

433


You want to search for sale and sales. What regular expression should you use?

482


Is bsd a posix?

458


Is everything in linux a file?

440


What is a shell program in linux?

502