Save the PID of the music script in order to properly kill it

pull/33/head
Raphaël Vinot 2015-03-16 15:36:45 +01:00
parent f3a4860a7a
commit 6ae56e26cb
1 changed files with 3 additions and 1 deletions

View File

@ -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