Add event.d file to start rotated on startup
# Please enter the commit message for your changes.
# (Comment lines starting with '#' will not be included)
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	new file:   rotated
#	modified:   rotatedaemon.pro
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	Makefile
#	build-stamp
#	builddir/
#	debian/files
#	debian/rotatedaemon.substvars
#	debian/rotatedaemon/
#	main.o
#	moc_rotationdaemon.cpp
#	moc_rotationdaemon.o
#	rotatedaemon
#	rotatedaemon.pro~
#	rotationdaemon.o
diff --git a/rotated b/rotated
new file mode 100644
index 0000000..604753c
--- /dev/null
+++ b/rotated
@@ -0,0 +1,10 @@
+description "Starts the rotation daemon"
+
+start on started hildon-desktop
+stop on starting shutdown
+
+script
+	export DISPLAY=:0.0
+	exec /usr/bin/rotatedaemon &
+end script
+
diff --git a/rotatedaemon.pro b/rotatedaemon.pro
index 5783742..5f2101e 100644
--- a/rotatedaemon.pro
+++ b/rotatedaemon.pro
@@ -19,3 +19,9 @@ HEADERS += \
 target.path = /usr/bin
 
 INSTALLS += target
+
+maemo5:* {
+    INSTALLS += eventfile
+    eventfile.path =  /etc/event.d/
+    eventfile.files += rotated
+}
