[Icecast] Proper way to start multiple icecast services through bash script?

Walter York walteryork at hotmail.com
Mon May 29 16:09:01 UTC 2017


I replaced:   ps -ef | grep icecast | grep -v grep | awk '{print $2}' | xargs -r kill -9

with:   pkill icecast
This works.

I did try "pkill -HUP icecast" but it didn't seem to have intended effect of refreshing certificate.

From: Icecast <icecast-bounces at xiph.org> on behalf of Philipp Schafft <lion at lion.leolix.org>
Sent: Monday, May 29, 2017 11:27 AM
To: Icecast streaming server user discussions
Subject: Re: [Icecast] Proper way to start multiple icecast services through bash script?

Good afternoon,

On Mon, 2017-05-29 at 17:35 +0300, Yahav Shasha wrote:
> try this:
> /usr/bin/icecast -c /etc/icecast.xml -b > /dev/null 2>&1 &
> as for killing them, don't overcomplicate things, killall icecast -KILL

You should never kill process with SIGKILL if not really, really needed.
Using SIGKILL will not give them a chance to clean up. E.g. no flushing
of logs, no telling clients (just connection resets), no cleanup of open
sockets (may result in stalled connections), no closing of databases
(for applications that use databases) or other backend services and
child processes.

Icecast2 perfectly handles SIGTERM.

> On Mon, May 29, 2017 at 5:27 PM, Walter York <walteryork at hotmail.com> wrote:
> >>>  #Kill all processes with the name icecast
> >>>  ps -ef | grep icecast | grep -v grep | awk '{print $2}' | xargs -r
> >>>  kill -9

use pkill here. That is portable. It has a lot options to select the
correct process.

Also avoid using signal numbers. they're not portable and bad style.
SIGTERM is the default for pkill.

with best regards,

 (Rah of PH2)
Icecast mailing list
Icecast at xiph.org
Icecast Info Page - Xiph.Org Foundation<http://lists.xiph.org/mailman/listinfo/icecast>
While this list and IRC are preferred for user support. There is also a web forum for user support. See icecast.org for links. To see the collection of prior postings ...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20170529/c44ba340/attachment.html>

More information about the Icecast mailing list