[icecast] capturing pid from command line

Adon Irani
Fri, 06 Aug 2004 14:23:35 -0000

hello ;

can't recall where i got it from , but this should work .,

ps auxw | fgrep icecast | fgrep -v fgrep | awk '{print $2}'

 a:/,

On Mon, 3 Nov 2003, Dave St John wrote:

> Anyone know of or how to capture the pid via the command line in bash?
>
> i.e. i use this to capture shoutcast's process id
> #!/bin/bash
> SRV=`cat serverlst.txt`
>
> rm -rf pids/*
>
>
> for c in $SRV ; do
>
> nohup ./sc_serv servers/$c > /dev/null 2>&1 &
>
> echo "$! - $c" | tee pids/$c.pid
>
> done
>
> that works successfully with shoutcast but not with icecast2, ideas anyone?
>
>
> Dave St John
> (CEO) Mediacast1.com
>
>
> --- >8 ----
> List archives:  http://www.xiph.org/archives/
> icecast project homepage: http://www.icecast.org/
> To unsubscribe from this list, send a message to
'icecast-request@xiph.org'
> containing only the word 'unsubscribe' in the body.  No subject is
needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
>