#!/bin/sh
#
# Stops the Dftpd server
#

# Set this path to the dftpd root
cd /dftpd/bin

# Checks if the server is already stopped (or the PID file is missing)
if [ ! -r "dftpd.pid" ] ; then
  echo "Unable to stop Dftpd (dftpd.pid not found)."
  exit 1
fi

# Stop the server
DFTPD_PID=`cat "dftpd.pid"`
kill $DFTPD_PID
rm -f dftpd.pid
echo "Dftpd stopped."

