2013-02-15 18:47:13 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
2013-02-25 01:27:15 +01:00
|
|
|
#set -x
|
2013-02-15 18:47:13 +01:00
|
|
|
|
2013-02-17 02:16:55 +01:00
|
|
|
source ./constraint.sh
|
|
|
|
|
|
|
|
if [ ${ID} -ne 0 ]; then
|
|
|
|
echo "This script has to be run as root."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
clean(){
|
|
|
|
echo Done, cleaning.
|
|
|
|
${SYNC}
|
2015-03-16 15:36:45 +01:00
|
|
|
kill -9 $(cat /tmp/music.pid)
|
|
|
|
rm -f /tmp/music.pid
|
2013-02-17 02:16:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
trap clean EXIT TERM INT
|
|
|
|
|
2013-10-09 17:33:54 +02:00
|
|
|
./music.sh &
|
2015-03-16 15:36:45 +01:00
|
|
|
echo $! > /tmp/music.pid
|
2013-10-09 17:33:54 +02:00
|
|
|
|
2013-12-03 15:44:36 +01:00
|
|
|
# Dumb libreoffice wants to write into ~/libreoffice or crash with
|
|
|
|
# com::sun::star::uno::RuntimeException
|
|
|
|
mkdir /tmp/libreoffice
|
|
|
|
chown -R kitten:kitten /tmp/libreoffice
|
|
|
|
|
2013-06-06 16:26:23 +02:00
|
|
|
su ${USERNAME} -c ./groomer.sh
|
2013-02-15 18:47:13 +01:00
|
|
|
|