LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to I make PPTPD start at bootup?? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-i-make-pptpd-start-at-bootup-775216/)

gohuge 12-12-2009 03:36 PM

How to I make PPTPD start at bootup??
 
Seems like an easy enough thing to do but I can't seem to find any documentation on how to do it... I'm running 9.04 and have pptpd running fine but when I reboot the server it comes back up with pptpd NOT running and I have to go in and manually start it. Is there something in the pptpd config that can be set or does there need to be some other config to start pptpd on bootup? When I look in webmin it shows it's set to run at bootup but I still have to go to webmin/network/pptpd and use the start poptop button on the page to get it started.

Thanks,
T

Komakino 12-12-2009 05:02 PM

The simplest thing is probably to add an entry to the file /etc/rc.local

If the file already exists, edit it and add the command to start pptpd before the line that says exit 0. Save the file and make sure it is executable (chmod a+x /etc/rc.local). The file gets executed on start up after all the other multiuser startup files are run.

gohuge 12-12-2009 11:23 PM

OK.. Thanks for the info. I'm not very familiar with Linux yet but when I open rc.local I'm not sure where I can put the pptpd start statement. There are many commands and statements already there and I'm not sure where it is safe to add that line?

Komakino 12-13-2009 11:18 AM

Quote:

Originally Posted by gohuge (Post 3789407)
OK.. Thanks for the info. I'm not very familiar with Linux yet but when I open rc.local I'm not sure where I can put the pptpd start statement. There are many commands and statements already there and I'm not sure where it is safe to add that line?

There are two rc.local files, one in /etc/rc.local and one at /etc/init.d/rc.local. It's the former you want. In any case just add it as the last line in the file, or if the file ends with 'exit 0' put it as the line before that.

gohuge 12-13-2009 11:49 PM

OK.. Here is what I have in rc.local in the directory you mentioned above. I don't see "exit 0" so should I just put pptpd start at the end of the file???


#! /bin/sh
### BEGIN INIT INFO
# Provides: rc.local
# Required-Start: $remote_fs
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO


PATH=/sbin:/usr/sbin:/bin:/usr/bin

. /lib/init/vars.sh
. /lib/lsb/init-functions

do_start() {
if [ -x /etc/rc.local ]; then
[ "$VERBOSE" != no ] && log_begin_msg "Running local boot scripts (/etc/rc.local)"
/etc/rc.local
ES=$?
[ "$VERBOSE" != no ] && log_end_msg $ES
return $ES
fi
}

case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac

gohuge 12-18-2009 12:16 AM

OK.. Found the right rc.local file added start pptpd and still no dice.. Really strange. I can do a chkconfig and it shows that pptpd is ON (and will show that it's setup for runlevel 345. No matter what I do it doesn't actually start unless I use webmin and go to network/pptpd and click start from that page. I can't even figure out how to manual start it from the command line since it claims to be running from the command line even thought it is not. Anyone see this before?

gohuge 12-18-2009 07:04 PM

Yo... Do any of you clowns actually know how to do anything? If somebody asked me something about 9500 networking related topics I'd likely have an answer but I've been looking for some decent documentation or someone who can answer this very basic question with no luck... I don't know Linux YET but if this represents based on what I'm seeing so far I'll be a F'n expert before I get a simple answer!


All times are GMT -5. The time now is 05:47 PM.