#!/bin/sh

/bin/chmod -R 777 /sys/class/leds

mkdir /var/run/out-call-vibro
chmod -R 777 /var/run/out-call-vibro

cat > /etc/event.d/out-call-vibro << "EOF"
author "Victor Yagofarov"

description "Start the Outcoming Call Vibro script"
# generated by postinst

start on started hildon-desktop

script
/bin/chmod -R 777 /sys/class/leds
/bin/mkdir /var/run/out-call-vibro
/bin/chmod -R 777 /var/run/out-call-vibro
if [ -f /var/run/out-call-vibro/out-call-vibro.pid ] ; then /bin/rm /var/run/out-call-vibro/out-call-vibro.pid ; fi

/bin/su - user /usr/bin/run-out-call-vibro.sh
end script

EOF

/bin/su - user /usr/bin/run-out-call-vibro.sh

echo Done!

