-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > -----Original Message----- > From: tangk@basf-nz.co.nz [mailto:tangk@basf-nz.co.nz] > Sent: Wednesday, July 26, 2000 4:31 AM ... > Subject: How to add "kill the process" during shutdown Linux redhat > 6.1 server ... > I have a Linux red hat 6.1 server. I want kill a process > during shutdown the > server. The command line is: > kill `cat /.vnc/my-linux:1.pid` > Where should I put this command? so shutdown -r now will > execute this command > during shutdown process. you create a file called vnc located in /etc/rc.d/init.d you can get some information from the included example (at the end of this msg). as is mentioned there, you might want to change the start) branch of the case-clause so that your server is launced in the correct way too (remove it from your /etc/rc.d/rc.local) Furthermore you should create symbolic links that cause the starting and ending of the vnc server at entering c.q. leaving of runlevel 3. ln -s /etc/rc.d/init.d/vnc /etc/rc.d/rc3.d/K15vnc ln -s /etc/rc.d/init.d/vnc /etc/rc.d/rc3.d/S55vnc - -----snip----start--file-/etc/rc.d/init.d/vnc------------- #!/bin/sh # vnc # description: # This script handles the starting and stopping of a virtual # network console # . /etc/rc.d/init.d/functions case "$1" in start) echo "Put here the code to start the vnc daemon" ;; stop) kill `cat /.vnc/my-linux:1.pid` ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit 0 - -----snip----ending-file-/etc/rc.d/init.d/vnc------------- ******* Groetjes vanwege ***** Greetings From ******* Dieter Demerre - http://www.angelfire.com/de/ddemerre ddemerre@acm.org - ext.dieter.demerre@siemens.be Although this private and confidential e-mail has been sent to you through a personal Siemens account, it does NOT represent any official opinion of Siemens. If you are not the intended recipient of this e-mail and have received it in error, please notify the sender by replying with 'received in error' as the subject and then delete it from your mailbox. -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com> iQA/AwUBOX65iAlG34XnM6kpEQJ/IACglY/xUAGwAFqkn92AG5ZFd5J2+0oAnA/F 5OZCTeSmgynM8CBJA0fNygns =eirU -----END PGP SIGNATURE----- - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.rutgers.edu