description "starting maenotify daemon"
author "Daniele Maio"

console output

start on started hildon-desktop
stop on stopping shutdown

post-stop script
	#get current theme
	CURRENT_THEME=$(cat /etc/hildon/theme/index.theme  | grep GtkTheme | cut -f2 -d=)
	#copy current theme lockslider
	cp /home/user/.maenotify/$CURRENT_THEME/lockslider.png /home/user/.maenotify/lockslider.png
	#restore imgs
	for i in `find /usr/share/themes/ | grep lockslider`; do cp /home/user/.maenotify/$(echo $i | cut -f5 -d/)/lockslider.png $i;done
end script

exec /bin/su user -c "/usr/bin/run-standalone.sh /usr/bin/maenotify > /home/user/.maenotify/maenotify.log 2>&1 &"


