>> I run one program which needs to be started as a particular user
>> whenever the system comes up, but there is no ebuild.  Is this the
>> Gentoo way?
>>
>> # cat /etc/init.d/rc.local
>> #!/sbin/runscript
>>
>> start() {
>> su user
>> /path/to/program/binary
>> }
>
> Yes, or you could use
>
> start() {
>  su - user -c /path/to/program/binary
> }
>
> which runs the program with the user's full environment instead of
> inheriting root's.
>
>
> --
> Neil Bothwick

Hmmm, it didn't come back up with the server.  I have this in
/etc/init.d/rc.local:

#!/sbin/runscript
depend() {
}
start() {
su - user -c /path/to/binary
}
stop() {
}
restart() {
}

I had to start it like I normally do instead:

# su - user
$ /path/to/binary

What could I be missing?

- Grant

Reply via email to