LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-24-2004, 01:12 PM   #1
onionkn1ght
LQ Newbie
 
Registered: Sep 2004
Posts: 20

Rep: Reputation: 0
Making stuff run at boot


I've been trying to make pure-ftpd start at boot. I've tried making a file in /etc/rc.d/init.d called pure-ftpd, it belonged to root, could be executed and contained:

#!/bin/bash
exec /usr/local/sbin/pure-ftpd &

But that didn't work. What did I do wrong? Or is there some other method?
 
Old 09-24-2004, 02:51 PM   #2
crashmakerMX
LQ Newbie
 
Registered: Sep 2004
Posts: 17

Rep: Reputation: 0
most of the common distributions use SysVInit so i think your distro does also use it.

this page explains how the SysVinit bootscripts work:

http://lfs.linux-matrix.net/lfs/view...r07/usage.html
 
Old 09-24-2004, 03:49 PM   #3
onionkn1ght
LQ Newbie
 
Registered: Sep 2004
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks! That page together with: http://www.bsdforum.org/forums/showt...?threadid=5449
made me realize how it works.

#!/bin/bash
case "$1" in
start)
/usr/local/sbin/pure-ftpd -B -g /var/run/pure-ftpd.pid && echo -n ' pure-ftpd'
;;
stop)
kill `cat /var/run/pure-ftpd.pid` && echo -n ' pure-ftpd'
;;
*)
echo "$0 start | stop"
;;
esac

That's how my script looks like now, and it works perfectly. Don't have any idea what esac does but I guess it's essential in some way.
 
Old 09-24-2004, 04:06 PM   #4
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
esac = case, backwards
 
Old 09-24-2004, 05:24 PM   #5
onionkn1ght
LQ Newbie
 
Registered: Sep 2004
Posts: 20

Original Poster
Rep: Reputation: 0
Oh... I get it now, you write it backwards to tell the script where stop? Like if and fi.
 
Old 09-25-2004, 06:02 AM   #6
crashmakerMX
LQ Newbie
 
Registered: Sep 2004
Posts: 17

Rep: Reputation: 0
you've got it.
 
Old 09-27-2004, 04:18 AM   #7
avirup dasgupta
Member
 
Registered: Aug 2003
Distribution: Redhat , Fedora Core4, DSL,Solaris
Posts: 49

Rep: Reputation: 15
#chkconfig <service> on/off

If u like to start kudzu at bootup,issue
#chkconfig kudzu on

Do a man "chkconfig"








Avirup
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
making a command run after boot phillips321 Linux - Software 1 04-19-2005 09:11 PM
Making SSHd Run On Boot Chrysalid Linux - Software 3 04-02-2005 05:55 AM
Making shells run at startup? Tuxluver Fedora 3 02-19-2005 02:57 PM
Making Another Run at Linux! saturninus Linux - Newbie 6 09-27-2004 09:49 AM
make stuff run at startup (in a seperate console) Red Squirrel Linux - Newbie 7 03-04-2004 10:25 PM

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

All times are GMT -5. The time now is 04:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration