Run a (service) command as a normal user during start up
I have found so many ways for root user to execute commands in so many possible path locations - but having difficulties on executing commands as normal user - during start up.
This is what i've got for /etc/rc.d/rc.local script: Code:
su -l user && (/bin/sh svc_cmd.sh &) (this thread sort of a continued question of this: -thread-) |
Quote:
Code:
(su - user -c /bin/sh <full path to>/svc_cmd.sh )& EDIT: as the command is going to be backgrounded and is a single command, the suggested command is pointlessly complex and can more simply be Code:
su - user -c /bin/sh <full path to>/svc_cmd.sh & |
Thanks!
|
All times are GMT -5. The time now is 08:29 AM. |