use proper parameters for earlier versions of 'timeout' command

-hide warning if older version of timeout doesn't support --version
This commit is contained in:
Martin Konecny 2013-05-28 16:29:07 -04:00
parent c22df32dd8
commit 176dd91e20
1 changed files with 3 additions and 2 deletions

View File

@ -35,9 +35,10 @@ start () {
}
stop () {
timeout --version >/dev/null 2>&1
RESULT="$?"
#send term signal after 10 seconds
timeout --version
RESULT="$?"
if [ "$RESULT" = "0" ]; then
timeout -s9 10s /usr/lib/airtime/airtime_virtualenv/bin/python \
/usr/lib/airtime/pypo/bin/liquidsoap_scripts/liquidsoap_prepare_terminate.py