On 23 June 2010 21:45, Rob Beard <r...@esdelle.co.uk> wrote:
> Hi folks,
>
> I'm trying to setup Shoutcast on a VPS server for a mate of mine as a
> favour.  The VPS server is running Ubuntu 8.04 AMD64.
>
> Now I gather from reading up, it is recommended that the shoutcast
> daemon is run as a user rather than root (presumably for security purposes).
>
> The thing is, I can't figure out how to do it.  At first I thought of
> creating an init script, but presumably it'll run as root?
>
> I also thought about cron, but I guess that would require me to enter a
> start time (so if the server goes down say in the middle of the day then
> it'll have to wait until the start time in the crontab?)

You can specify @reboot instead of the time and date settings in
crontab, which is probably the most straightforward way of doing this

> So I wondered if there was any way of running the shoutcast daemon as
> another user basically from when the machine boots?

Alternatively, you can make /etc/rc.local executable (sudo chmod +x
/etc/rc.local) and then add *before the exit 0 line* « sudo -u
username command » -- the crontab method seems neater to me though.

The only issue you might get with the crontab version is if it runs
before the network is initialised and shoutcast expects an interface
to be there. You shouldn't have this problem with rc.local because it
won't run until after all the other init scripts, but it's probably
worth just trying the crontab method first.


-- 
Matt Wheeler
m...@funkyhat.org

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.ubuntu.com/UKTeam/

Reply via email to