Running process on startup as a user

Manolis Kiagias sonicy at otenet.gr
Thu Sep 13 11:21:17 PDT 2007



Jack Barnett wrote:
>
> Using FreeBSD 6.2 x86.
>
> I have a script called:
>
> /home/foo/scripts/MyScript.sh
> The user is 'foo'.  The password is 'bar'.
>
> What I'm trying to do is run the MyScript.sh command on startup (that
> way if the box reboots, then this users process also re-starts it's
> self).
>
> thoughts?
>

Looks like a good job for a user crontab:

Login as the foo user, type:

crontab -e

Insert the line:

@reboot       /home/foo/scripts/MyScript.sh

Save, exit, you are done. Look at man 5 crontab for more details and
possible caveats.


More information about the freebsd-questions mailing list