The system does not close the application running on the background when the user uninstalls the application. If the application needs to handle these situations gracefully a preremove/postremove script needs to be used. <more information later>
Does your daemon run as root or user? Ie have you ensured that your kill command run as root if your daemon runs as root? That can be done with aegis manifest.
exec /usr/bin/aegis-exec -s -u user /opt/debota/lancia
as devel-su,
start/stop apps/debota_daemon
works flawlessy.
Also, installing not from QtCreator, but from .deb package via download works (as in, app is started after install thanks to postinst script as expected).
But upon uninstall, it fails.
It is as if the prerm script would not be there.
*BUMP*
an update; apparently, the process is killed no problem if assigned to "nobody".
So problem seems to actually be linked to forcing the daemon into user / users via aegis (as instructed by the above link, same place where i got the postinst / prerm scripts from):
Ooook!
So, yes, my daemon is actually an app (!) and yes, it has a window.
So, daemon is no go.
How about prestart / Applifed ? It seems the best alternative, but according to harmattan official docs /etc/prestart is *NOT* in the nokia QA path exception list - does this mean that making my app prestartable will invalidate it automagically for nokia store?
Nevermind, found my info.
File is part of system integration, therefore cannot be modified.
Unfortunately, this request was not even considered by Nokia so it seems the applifed daemon only relies on nokia.conf which is LAME.
What problem are you trying to solve by doing prestart? You can just kill the ui part from the script too.
I want my app to start on boot (preferably with the prestarted apps and before the user can interact with the homeview); of course there is upstart, but upstart is started after the -prestart's (which is not really optimal, as it makes my ui not available straight away); so I was keeping it as a (very not wanted) backup solution; and whilst testing it prevently, I encountered the problem during the deinstallation mentioned above.
Applifed would have been perfect solution, for the starting on boot (but once again meh nokia ), but for the uninstalling maybe things are different.
I want my app to start on boot (preferably with the prestarted apps and before the user can interact with the homeview); of course there is upstart, but upstart is started after the -prestart's (which is not really optimal, as it makes my ui not available straight away); so I was keeping it as a (very not wanted) backup solution; and whilst testing it prevently, I encountered the problem during the deinstallation mentioned above.
Applifed would have been perfect solution, for the starting on boot (but once again meh nokia ), but for the uninstalling maybe things are different.
You could probably do it in open mode or using inception, but then no-dice getting the application to Nokia Store.
Apart from that, using Upstart is AFAIK the only possibility.