Something like this if you want a programmatic way
of dealing with it.
Code:
#!/bin/sh
ftpid=`lsof -i -n | grep ftp | awk ' {print $2}'`
if [ ! -z "$ftpid" ] ; then
kill -kill $ftpid
echo "Killed process: $ftpid"
exit
fi
echo "FTPD is not running"
Otherwise just find the process id and send
a kill to it. Or be civilized and RTFM for your
ftpd and see if there is a way to shut it down
more gracefully. Many ftpd's run from(x)inetd,
so there may not be.
Marsd is right on the money. Find the deamon it was/will_be started from and see if there's any options to it. Classics are around the style of :
$deamon {start|stop|reload|halt}
If you are truly lost, find which script is invoked in your RC directories and start from there. LOCATE helps... i suggest installing it since i abuse it everyday to find files that i know but simply don't remember where they are.
If you are using wu-ftpd and the aim is to allow/prevent ftp connections, then it can be done from the /etc/ftpaccess config file. Typically the following is in the file, uncomment the 2nd line if you want to disallow FTP connections for a period:
# If /etc/shutmsg exists, don't allow logins
# shutdown /etc/shutmsg
IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.