[ubuntu-uk] Running daemon at startup as another user
Simon Greenwood
sfgreenwood at gmail.com
Wed Jun 23 22:09:14 BST 2010
On 23 June 2010 21:45, Rob Beard <rob at 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?)
>
> So I wondered if there was any way of running the shoutcast daemon as
> another user basically from when the machine boots?
>
>
You can set the user and group in the security stanza of the configuration
file. You can then launch it from an init script and it should run as the
user.
Running it from cron is also valid, but you run a script every minute (or
whatever interval you want) that checks for the pid file or running process
and restarts the server if it can't find one or the other.
Icecast is better documented and more actively supported than shoutcast on
Linux - the old shoutcast documentation doesn't seem to exist anymore.
s/
--
Save BBC 6 Music http://www.love6music.com
My CV: http://bit.ly/sfgreenwood_cv
Linkedin: http://www.linkedin.com/in/simonfgreenwood
Twitter: @sfgreenwood
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-uk/attachments/20100623/57c974ef/attachment.htm
More information about the ubuntu-uk
mailing list