Jump to content
  • Advertisement
Sign in to follow this  
Ilici

Startup Script for FTP server

This topic is 5407 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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).

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!