LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-19-2004, 08:31 AM   #1
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
How to get service to start at boot


Hi,
I'm running Fedora Core 1. Found out that ftp server was not installed, so I downloaded proftpd, configured, made, installed. Started it, runs great. But it won't start when the box boots.

I tried this:

[root@linux proftpd-1.2.10rc1]# chkconfig --level 345 proftpd on

and got this:

error reading information on service proftpd: No such file or directory

It's installed to /usr/local/proftpd-1.2.10rc1. Again, I can manually start/stop the service, but can't get it to start automatically. Ideas?

TIA
 
Old 05-19-2004, 08:44 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,634

Rep: Reputation: Disabled
Can chkconfig find it in your path? (Type echo $PATH to check)...
 
Old 05-19-2004, 10:58 AM   #3
sirpimpsalot
Member
 
Registered: Feb 2004
Posts: 141

Rep: Reputation: 15
or are you missing a config file, or have errors in a config file for proftpd?

when I set up vsftpd I got similar errors...
 
Old 05-19-2004, 04:45 PM   #4
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Original Poster
Rep: Reputation: 30
Hi,

Thanks for the replies.

The conf file exists and is without errors. I can start proftpd manually and it runs great.

JZL240I-U, no, it is not in the path. So I assume I have to edit /etc/profile to put it there? Any tips on that?

Thanks again!
 
Old 05-19-2004, 08:04 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Does an init script for proftpd exist in the /etc/rc.d/init.d directory. All chkconfig is going to do is symlink to that file from the startup directory, so if it can't find it, it's probably going to be confused. Try typing chkconfig --list and see what services chkconfig recognizes -- there should be correspondence between these and what's in /etc/rc.d/init.d. You might also want to run proftpd out of xinetd. Go to /etc/xinetd.d and look at example xinetd files. Then copy one and modify it to start proftpd and restart xinetd. Then xinetd will start up proftpd when it starts, and xinetd should be starting on boot.
 
Old 05-19-2004, 08:46 PM   #6
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Original Poster
Rep: Reputation: 30
Hi,

There is no script in /etc/rc.d/init.d for proftpd. I have not found one at proftpd.org, but I did find this one at radom.org--do you think it would work?

Code:
#!/bin/sh
# dan@radom.org
# 
case "$1" in

  start)
        echo "starting proftpd..."

        /usr/local/sbin/proftpd -c /etc/proftpd.conf

;;

 stop)
        echo "stopping proftpd..."

        for pid in `cat /var/run/proftpd.pid`
          do kill -9 $pid
        done

        rm /var/run/proftpd.pid
;;

 restart)
        echo "restarting proftod..."

        for pid in `cat /var/run/proftpd.pid`
          do kill -9 $pid
        done

        /usr/local/sbin/proftpd -c /etc/proftpd.conf
;;

  *)
        echo "*** Usage: proftpd {start | stop | restart}"
        exit 1

esac
proftpd is at /usr/local/sbin/proftpd, so that is OK, but the conf file is not at /etc/proftpd.conf, it is at /usr/local/etc/proftpd.conf, so I would have to change that part. (I assume it is there because before make I went ./configure --prefix=/usr/local. N00bs prolly should stick to packages. )

What would be the advantage to running it under xinetd? Is there some performance boost? This is not a production server, so neither security nor performance are really an issue, but it would still be good to know for the future (when it might be an issue!_)

Thanks for the help.
 
Old 05-19-2004, 11:54 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Zaichik, based on a quick read, it looks like that init script will work fine as long as you change the location of the configuration file.

There is a slight advantage to running servers out of inetd/xinetd if they are not going to be accessed very much. Whenever you start a daemon it runs as a process on your system. If it's not serving requests, the daemon is just sitting around taking up (a very small amount of) memory. If you run it through xinetd, xinetd will listen on the service's port and kick off the daemon only when there's a request to be handled.

The savings aren't really all that noticeable any more given how fast/powerful modern hardware is. If the daemon is going to be processing a lot of requests, though, it's probably best to let it run as its own process so xinetd doesn't have to fire it up each time.
 
Old 05-20-2004, 08:21 AM   #8
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Original Poster
Rep: Reputation: 30


OK, I copied and pasted the script to init.d, and then:

Code:
[root@linux init.d]# chkconfig --level 2345 proftpd on
service proftpd does not support chkconfig
So now what? You said that all that chkconfig does is symlink the startup script to the startup directory--can I do that manually and achieve the same effect?

It looks like maybe the symlink is created in /etc/rc.d/rc#.d directory, where # maybe corresponds to the runlevel? It also looks as though the symlink is named in such a way as to control the order in which the services are started. For example, the link to httpd is named S85httpd.

If my hunch is correct, what would be a proper name for the proftpd link? I would be safe if I started it after httpd, since all necessary services would already be running, correct?

Thanks again for your help!
 
Old 05-22-2004, 06:22 AM   #9
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Original Poster
Rep: Reputation: 30
This seems like it would be right, but I would like a confirmation if someone would be so kind.
 
Old 07-21-2004, 09:34 AM   #10
jbeiter
Member
 
Registered: Jul 2004
Posts: 105

Rep: Reputation: 15
service <foo> not supported by chkconfig

bump..

I'm having this same problem. Trying to add some scripts to start up services but I'm getting this error from chkconfig.

The scripts were added to /etc/init.d

Quote:
[root@linux init.d]# chkconfig --level 5 WSNode on
service WSNode does not support chkconfig
[root@linux init.d]#
perms are: -rwxr-xr-x 1 root root

They were created by editing the template from /usr/share/doc/initscripts-6.7/

Does chkconfig require something else? I don't have tksysv installed, if that matters.
 
Old 08-27-2008, 08:13 PM   #11
ra2833
LQ Newbie
 
Registered: Oct 2002
Posts: 3

Rep: Reputation: 0
holy crappp i got it to work

i commented out the following lines of code, because at one point the OS was telling me that there was something wrong with line item number 66....

what i commented out was:
#condrestart)
#if [ -f /var/lock/subsys/proftpd ]; then
# stop
# start
#if
#;;


so is there someone that could help me out on figuring out what the right syntax would be for the snippet of code?

thx,
newbie
 
Old 08-27-2008, 08:59 PM   #12
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Original Poster
Rep: Reputation: 30
The second to the last line that you commented out is the end of an if-then, so the word if should be backwards: "fi"

Code:
condrestart)
   if [ -f /var/lock/subsys/proftpd ]; then
      stop
      start
   fi
   ;;
 
Old 08-27-2008, 09:15 PM   #13
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Original Poster
Rep: Reputation: 30
Heh, I think this may have been my very first post--the actual reason that I joined this forum.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BOINC as a service to start at boot purelithium Linux - General 14 11-18-2005 09:04 PM
Network service start at boot? King of Japan Linux - Networking 2 09-01-2005 10:23 AM
how to start a service at boot senthilkumar Slackware 2 07-19-2004 07:33 AM
NEWBIE: The boot is locked on 'start SMB service'. Please HELP ME! edika Linux - General 2 05-06-2004 02:26 AM
start the service for every boot time yuva_mca Linux - General 3 03-09-2004 01:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration