Running process on startup as a user

Duane Hill d.hill at yournetplus.com
Thu Sep 13 11:18:37 PDT 2007


On Thu, 13 Sep 2007 at 13:15 -0500, jackbarnett at gmail.com confabulated:

>
> 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?

You could put the script in a crontab for that user:

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

According to 'man 5 crontab', @reboot runs the script once at startup.

------
   _|_
  (_| |


More information about the freebsd-questions mailing list