How can I run a command as user "user" during the de-installation of my app?
Since my App modifies the wallpaper, I want to restore the default one during de-installation.
How ever, in the lastest beta of PR1.2 (28.2012.03-1_PR_001), root is not allowed anymore to modify files belonging to user.
Because of that, I can not do it anymore in the postrm script of the deb file.
Or is there a way with aegis-exec?
I tried it with
exec /usr/bin/aegis-exec -s -u user /opt/myapp/bin/myapp
but it didnt work.
I succeeded to run the command as user with a daemon stop command, this then how ever gets run every time the user shuts down the device or the daemon gets stopped.
I would prefer only to run it on a real de-installation.