How to start a script running at boot time?

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Thu Mar 23 20:39:54 UTC 2006


wc_fbsd at xxiii.com writes:

> I have a script I would like to launch at boot time, as a non-root
> user,  to remain running in the background.  What is the best way to
> accomplish this?  I looked through the rc* stuff, and it looks like
> overkill for what I need, plus my scripting isn't that strong either.

Um, okay.  The "rc* stuff" covers a lot of techniques, including
simple scripts that just get run without worrying about parameters or
so on, but that's your call...

> I know I can do something like:   su - user -c "script_to_run"
> But I don't even know what's the best place to include that.
> 
> Any suggestions, or examples?

How about using @reboot in the user's crontab(5)?


More information about the freebsd-questions mailing list