#1  
Old 23rd January 2008, 09:27
baldur2630 baldur2630 is offline
Member
 
Join Date: Jan 2007
Location: Belgium
Posts: 30
Thanks: 3
Thanked 1 Time in 1 Post
Default Newbie cry for help!

I decided to install ProFTPD Admin. To do this, I had to first remove the old rpm version and then download the source and recompile it with MySQL support.

It all worked beautifully, I was very proud of myself, ProFTPD and the admin module is perfect.

So what's the problem?

I can start ProFTPD manually. I tried to use chkconfig to add it to the services and it says operation not supported..

How do I add ProFTPD standalone to the Services so it starts when the box is booted and I can stop and restart it? It's a Fedora 8 Server

Last edited by baldur2630; 23rd January 2008 at 09:31.
Reply With Quote
Sponsored Links
  #2  
Old 23rd January 2008, 09:36
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
Default

You need to install and init script for it, then chkconfig will work. Am sure that the init script from your old rpm should work unless the paths for the compiled version are different but am sure you can fix that.
Reply With Quote
The Following User Says Thank You to topdog For This Useful Post:
baldur2630 (23rd January 2008)
  #3  
Old 23rd January 2008, 10:17
baldur2630 baldur2630 is offline
Member
 
Join Date: Jan 2007
Location: Belgium
Posts: 30
Thanks: 3
Thanked 1 Time in 1 Post
Default

I created the following script and put it into /etc/init.d but that doesn't seem to work. What am I missing?

#!/bin/sh

# ProFTPD files

FTPD_BIN=/usr/local/sbin/proftpd
FTPD_CONF=/usr/local/etc/proftpd.conf
PIDFILE=/var/run/proftpd.pid

# If PIDFILE exists, does it point to a proftpd process?

if [ -f $PIDFILE ]; then
pid=`cat $PIDFILE`
fi

if [ ! -x $FTPD_BIN ]; then
echo "$0: $FTPD_BIN: cannot execute"
exit 1
fi

case $1 in

start)

if [ -n "$pid" ]; then
echo "$0: proftpd [PID $pid] already running"
exit
fi

if [ -r $FTPD_CONF ]; then
echo "Starting proftpd..."
$FTPD_BIN -c $FTPD_CONF
else
echo "$0: cannot start proftpd -- $FTPD_CONF missing"
fi
;;

stop)

if [ -n "$pid" ]; then
echo "Stopping proftpd..."
kill -TERM $pid
else
echo "$0: proftpd not running"
exit 1
fi
;;

restart)
if [ -n "$pid" ]; then
echo "Rehashing proftpd configuration"
kill -HUP $pid
else
echo "$0: proftpd not running"
exit 1
fi
;;

*)

echo "usage: $0 {start|stop|restart}"
exit 1
;;

esac
exit 0
Reply With Quote
  #4  
Old 23rd January 2008, 10:30
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
Default

I have modified it to work with chkconfig.

Code:
#!/bin/sh
# 
#
# proftpd       This shell script takes care of starting and stopping
#               proftpd.
#
# chkconfig: - 80 30
# description: ProFTPd is an enhanced FTP server with a focus towards
#
  FTPD_BIN=/usr/local/sbin/proftpd
  FTPD_CONF=/usr/local/etc/proftpd.conf
  PIDFILE=/var/run/proftpd.pid

# If PIDFILE exists, does it point to a proftpd process?

 if [ -f $PIDFILE ]; then
    pid=`cat $PIDFILE`
 fi

 if [ ! -x $FTPD_BIN ]; then
   echo "$0: $FTPD_BIN: cannot execute"
   exit 1
 fi

 case $1 in

   start)

  if [ -n "$pid" ]; then
       echo "$0: proftpd [PID $pid] already running"
       exit
  fi

  if [ -r $FTPD_CONF ]; then
      echo "Starting proftpd..."
      $FTPD_BIN -c $FTPD_CONF
  else
      echo "$0: cannot start proftpd -- $FTPD_CONF missing"
  fi
  ;;

  stop)

    if [ -n "$pid" ]; then
       echo "Stopping proftpd..."
       kill -TERM $pid
   else
       echo "$0: proftpd not running"
       exit 1
   fi
   ;;

    restart)
     if [ -n "$pid" ]; then
        echo "Rehashing proftpd configuration"
        kill -HUP $pid
     else
       echo "$0: proftpd not running"
       exit 1
    fi
    ;;

   *)

   echo "usage: $0 {start|stop|restart}"
   exit 1
   ;;

   esac
   exit 0
Reply With Quote
The Following User Says Thank You to topdog For This Useful Post:
baldur2630 (23rd January 2008)
  #5  
Old 23rd January 2008, 10:53
baldur2630 baldur2630 is offline
Member
 
Join Date: Jan 2007
Location: Belgium
Posts: 30
Thanks: 3
Thanked 1 Time in 1 Post
Default

OK, it's now showing as a Service BUT...

proftpd: unrecognized service
Reply With Quote
  #6  
Old 23rd January 2008, 10:59
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
Default

When does that error show up ? Is it when you run
Code:
service proftpd start
This is what happens on my side but its simply due to the fact that i dont have proftpd installed in that location.
Code:
[root@tdss ~]# chkconfig --level 345 proftpd on
[root@tdss ~]# service proftpd start
/etc/init.d/proftpd: /usr/local/sbin/proftpd: cannot execute

Last edited by topdog; 23rd January 2008 at 11:02.
Reply With Quote
The Following User Says Thank You to topdog For This Useful Post:
baldur2630 (24th January 2008)
  #7  
Old 24th January 2008, 16:31
baldur2630 baldur2630 is offline
Member
 
Join Date: Jan 2007
Location: Belgium
Posts: 30
Thanks: 3
Thanked 1 Time in 1 Post
Default

I did chkconfig --level 345 proftpd on and then went to the Service Panel and that is what is showing.

If I click restart or stop or start, nothing changes. I haven't tried service proftpd stop or start, because it was (is) in use and I didn't want to kick anyone off.

Do you think service proftpd restart from the command line will sort it out?
Reply With Quote
  #8  
Old 24th January 2008, 17:31
topdog topdog is offline
Senior Member
 
Join Date: Jan 2008
Location: South Africa
Posts: 1,352
Thanks: 0
Thanked 154 Times in 151 Posts
 
Default

Yes test that, am not using ispconfig so i am not able to see what is causing that error.
__________________
----
http://www.topdog.za.net - Got Linux problems ? - I can help.
http://www.baruwa.org - Try it.
Reply With Quote
Reply

Bookmarks

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NEWBIE DNS Configuration HELP SHELLHOSTER Server Operation 1 10th November 2007 22:55
Newbie DNS question Upyr Server Operation 12 17th October 2007 06:29
Newbie with ubuntu 6.10 how to upload ispconfig? pcotter Installation/Configuration 2 3rd December 2006 11:50
I am A newbie I need Help^__^ Unknown_X Installation/Configuration 30 2nd August 2006 11:12
Newbie starter guide on making site online kapatid General 10 9th May 2006 01:12


All times are GMT +2. The time now is 23:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.