From 6ae56e26cbb99822dfa0d842809f07bda4b1b2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 16 Mar 2015 15:36:45 +0100 Subject: [PATCH] Save the PID of the music script in order to properly kill it --- fs/opt/groomer/init.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/opt/groomer/init.sh b/fs/opt/groomer/init.sh index cc029e5..20aa658 100755 --- a/fs/opt/groomer/init.sh +++ b/fs/opt/groomer/init.sh @@ -13,11 +13,14 @@ fi clean(){ echo Done, cleaning. ${SYNC} + kill -9 $(cat /tmp/music.pid) + rm -f /tmp/music.pid } trap clean EXIT TERM INT ./music.sh & +echo $! > /tmp/music.pid # Dumb libreoffice wants to write into ~/libreoffice or crash with # com::sun::star::uno::RuntimeException @@ -26,4 +29,3 @@ chown -R kitten:kitten /tmp/libreoffice su ${USERNAME} -c ./groomer.sh -