Execute script after each reboot

Hi everyone,

I have a script that I want to execute automatically after each reboot of IPFire. I’m looking for something similar to ‘@reboot’ in the crontab on Ubuntu or a systemd service. Is there any way to achieve this? Thanks for your help.

Hi @mogholami

Welcome to the IPFire community.

Place your script in the rc.local script.

See the rc.local Docs page
https://www.ipfire.org/docs/pkgs/rc-local

3 Likes

thanks a lot dear @bonnietwin.

Hi @mogholami ,

IPFire uses fcron which supports the @reboot shortcut. Please refer to the documentation:

http://fcron.free.fr/doc/en/fcrontab.5.html

Also check out this post about the recommended way to use frcron in IPFire, especially Adolf Belka’s answer:

Greetings.

1 Like

I appreciate your help, @binabik.

BTW, the difference between @reboot in fcrontab and rc.local is, that the crontab entries aren’t really executed at reboot but after start of fcron after a reboot. The rc.local file is integrated into the startup sequence.

2 Likes