startup daemon as unpriviliged user

Chuck Swiger cswiger at mac.com
Fri Feb 13 17:44:23 PST 2004


Louis LeBlanc wrote:
> So, how can I get a process to run automatically on startup for an
> unprivileged user?

It's reasonable to create a fetchmail.sh script in /usr/local/etc/rc.d which 
does something like:

#!/bin/sh

USER = me
COMMAND = /usr/local/bin/fetchmail...

su - ${USER} -c ${COMMAND}

In this case, however, you might want to invoke it from a per-user cron script 
eievery hour or so instead...

-- 
-Chuck



More information about the freebsd-questions mailing list