Circlean/fs/opt/groomer/init.sh

32 lines
513 B
Bash
Raw Normal View History

2013-02-15 18:47:13 +01:00
#!/bin/bash
set -e
#set -x
2013-02-15 18:47:13 +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}
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
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