If you want to start a service automatically you probably want to use the
/etc/ you will find a number of directories named
These represent runlevels, and are filled with carefully named soft links to scripts in in
/etc/init.d/ directory that are executed in order in different stages of the startup and shutdown processes. The
/etc/init.d directory is filled with scripts starting and stopping different services, and one of the scripts you will find there is the
pptpd service script.
When you execute a command like
service pptpd start, the
pptpd script in
/etc/init.d is executed with the
What you want to do is to start the pptpd service at runlevel 2. That means you create a soft link in the
S16pptpd that points to the
/etc/init.d/pptpd script, like so:
ln -s /etc/init.d/pptpd /etc/rc2.d/S16pptpd
- "S" is for "start"
- "16" is the ordering
- "pptpd" is a mnemonic
This will make sure that when your system enters runlevel 2, the pptpd service will be started.