Philipp Schafft
2017-May-29 15:27 UTC
[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 -KILLYou 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 -9use 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, -- Philipp. (Rah of PH2)
Walter York
2017-May-29 16:09 UTC
[Icecast] Proper way to start multiple icecast services through bash script?
Philipp, 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 -KILLYou 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 -9use 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, -- Philipp. (Rah of PH2) _______________________________________________ Icecast mailing list Icecast at xiph.org http://lists.xiph.org/mailman/listinfo/icecast Icecast Info Page - Xiph.Org Foundation<http://lists.xiph.org/mailman/listinfo/icecast> lists.xiph.org 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>
Philipp Schafft
2017-May-29 21:20 UTC
[Icecast] Proper way to start multiple icecast services through bash script?
Good evening, On Mon, 2017-05-29 at 16:09 +0000, Walter York wrote:> Philipp, > > > 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.This is not supported in Icecast2 2.4.x (stable). But there is a branch (ph3-update-TLS) for Icecast2 2.5.x that added support for that. We're currently in the process of merging it into 2.5.x (development). Have a nice evening, with best regards, -- Philipp. (Rah of PH2)
Reasonably Related Threads
- Proper way to start multiple icecast services through bash script?
- Proper way to start multiple icecast services through bash script?
- Proper way to start multiple icecast services through bash script?
- Proper way to start multiple icecast services through bash script?
- free Icecast windows source software with HE-AAC(/v2) support