Go Back   Cloud Computing > Support > Linux Server Hosting
 

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 12-19-06, 06:48
BodShane's Avatar
Chief Operating Officer
 
Join Date: Dec 2006
Posts: 1,088
Send a message via AIM to BodShane Send a message via MSN to BodShane
Default Shell Script Command - Killprocess

#!/bin/bash
#
# killprocess This shell script takes care of killing the process
#
# chkconfig: 2345 80 30
# description: Kill the process
# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network


# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0


RETVAL=0
echo "Prog? [0] $c"
read Prog
case "$Prog" in
0|[XxQq]) exit 0 ;;
esac

# Stop daemons.
echo -n "Shutting down $Prog: "
killproc $Prog
RETVAL=$?
echo
[ $RETVAL -eq 0 ]
exit $RETVAL

**********

Save the script at the root level & use it to kill a process as ./killprocess
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump


All times are GMT -6. The time now is 20:26.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Copyright © 1999-2012, BODHost Ltd. All rights reserved.