0

I have manually built the pure-ftpd on my Raspberry Pi and it runs perfectly fine when I invoke

/etc/pure-config.pl /etc/pure-ftpd.conf

from the command line. I'd like to run that simple command /etc/pure-config.pl /etc/pure-ftpd.conf in init.d like as if I'm running them at the command line.

The official or the custom init.d startup scripts are no good for me because they try to run pure-ftpd directly i.e. without the /etc/pure-ftpd.conf file. I need to run it with the /etc/pure-ftpd.conf How to do it?

Thanks.

0

Romario, It depends on whether your linux distribution uses systemd (most modern ones) or not (the ones that remained sane).

Before systemd:

Add your local commands to /etc/rc.d/rc.local and make this link ln -s /etc/rc.d/rc.local /etc/rc5.d/S99local (assuming you will boot in runlevel 5)

after systemd:

you should also add your commands to /etc/rc.d/rc.local, but don't forget to chmod +x /etc/rc.d/rc.local.

update:

On Raspberry Pi the folder is rcS.d. You can change the order the script will be called following this answer

  • Hello. Thank you for the answer. On my Raspbian, there's no /etc/rc.d folder. There are rc0.d . . . rc6.d folders and one rcS.d folder and the rc.local file but no /etc/rc.d folder. In that case, should I make that folder (in order to ad my local commands into /etc/rc.d/rc.local) ? – Romario Aug 6 '19 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.