Advertisement

Startup Script for FTP server

Started by September 28, 2004 07:48 AM
1 comment, last by gg83 20 years, 2 months ago
I've installed FreeBSD on my server and it's working great, not to mention it was really easy to install and configure for me as a not so educated unix user. I've installed Pure-FTPD server from the ports collection and it works, only now i want to make a script to start it up automatically from rc.d. I've looked at other scritps (like apache's one), but i can't figure out how to read in the PID file to kill the process when the script is run with the "stop" parameter. Any pointers on how would i write the script? Also, does the kernel startup the scripts in /usr/local/etc/rc.d with the "start" parameter at boot time or do i have to change some config?
I'm not familiar with BSD so I might be slightly wrong here, but...

From my LINUX experience: After some initial boot stuff the kernel runs "init". Init takes a number as a parameter indicating the "runlevel". This determines what startup scripts get run. They are all passed "start" as a parameter.

If I were you I'd check to make sure a startup script for FTP doesn't already exist. Try looking in /etc/init.d or something. If one exists you can make a symlink to it from rc.d and it should work.

Otherwise you can try looking for the "start-stop-daemon" program. This might help. I wouldn't think killing the server isn't really that important, but I suppose us geeks like doing things The Right Way (TM).
My stuff.Shameless promotion: FreePop: The GPL god-sim.
Advertisement
Should already be a startup script created in /usr/local/etc/rc.d/proftpd.sh and all you should need to do is set proftpd_enable="YES" in /etc/rc.conf
"Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it." - Samuel Johnson

This topic is closed to new replies.

Advertisement