Date: Sun, 24 Oct 2021 12:25:08 +1100 From: Dewayne Geraghty <dewayne@heuristicsystems.com.au> To: questions@freebsd.org Subject: Re: @reboot Message-ID: <9530031c-08dd-255f-25ae-24cecb7b3cfd@heuristicsystems.com.au> In-Reply-To: <224ff1f8-8ad2-3e5c-f7ed-17805c073ada@cloudzeeland.nl> References: <224ff1f8-8ad2-3e5c-f7ed-17805c073ada@cloudzeeland.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 24/10/2021 1:09 am, Jos Chrispijn wrote: > I have created a script to be runned afte reboot of my server. > Thing is now that if I stop and start a service, the scripts is ran as > well. > Is there a way of only executing after a total reboot? > > thanks, Jos > You might have missed the crontab option @reboot, see man 5 crontab It works reliably. I use it this way @reboot root /bin/sleep 10 && /root/bin/reboot.sh > /tmp/reboot.log
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9530031c-08dd-255f-25ae-24cecb7b3cfd>