×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 24

Thread: Daemon

  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    21

    Daemon

    hello,
    I would like create program which will use actual position. I know how to take position from GPS module on my N900. But I realy don't know how to do this program like daemon, which will start with Maemo OS. Can you help me with daemoning ? Mainly how to create daemon, start daemon, stop deamon and so on.

    I do it in Nokia QT SDK 1.1

    It will helps me a link to relevant source.

    Thank You Very Much

  2. #2

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    21

    Re: Daemon

    I read the article, but I still don't know how to implement it into MAEMO. I involve, that I have a console application which can take a GPS position and can use SQLite, now i would like to use this application like daemon. How can I do this ? How can I add it into rcS without root ? For Example I install the package with my GPS application and application to setup how the GPS application will works. I would like to setup the daemoning in my setup, but how ?

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Daemon

    The Debian packages can add your script to upstart init daemon. you could take a look at some packages like sysklogd to see how to do that.

    You can downlod the code with
    apt-get source sysklogd

    and then having a look at debian/ dir
    Last edited by gnuton; 2011-02-28 at 10:45.

  5. #5
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Daemon

    Apparently what you should do is to make an upstart job, which will be starting/stopping your daemon and place it under /etc/init/ (in your package .install).

  6. #6
    Registered User
    Join Date
    Feb 2011
    Posts
    21

    Re: Daemon

    thank you, for your time. I will try it..
    Last edited by Twyer; 2011-02-28 at 11:00.

  7. #7
    Registered User
    Join Date
    Feb 2011
    Posts
    21

    Re: Daemon

    Is there any manual how to create package with my GUI application and my daemon app. and too how to install it ? If I create package by Qt SDK 1.1 it can create package with one application only, but I would like to add the daemon. The next I would lilke to start daemon, but I can't see .install file in package I am sorry for asking forever, but I am trying to understand this problems for my Bachelor thesis, but I am a Windows user and now I am trying to deep into Ubuntu.

  8. #8

  9. #9
    Registered User
    Join Date
    Feb 2011
    Posts
    21

    Re: Daemon

    Hi, I ma back.

    I have daemon app in *deb package. I have postinst script which do update-rc.d job, U use this like update-rc.d georeminder start 80 S 2 3 4 5 . stop 20 0 1 6 . And I have a georeminder.init file, this run my application. If I install it, I can call /etc/init.d/georeminder start thats Ok, but If I restart mobile (N900) It doesn't run. Why ? I use in script georeminder.init this exec function: start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --make-pidfile --user root --name $NAME the variables are declared on the top of this script.

  10. #10
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Daemon

    Apparently you can do it the way you choose, but it would be much easier to make upstart job script. Need for having postinstall script is not really obvious for me.

  11. #11
    Registered User
    Join Date
    Feb 2011
    Posts
    21

    Re: Daemon

    Problem is that upstart-job isn't implicitly installed. I thought if I do .init file and maintainers scripts it will do it without any instalation other application (upstart-job).

    EDIT: Now I tried to create .upstart file, if I am triying to install I get the warnign message: georeminder depends on upstart-job, however: Package upstart-job is not installed. Where can I get upstart-job ? apt-get install upstart-job write error
    Last edited by Twyer; 2011-03-25 at 17:16.

  12. #12
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Daemon

    And who told you that you need to install upstart-job package?
    sysklogd is probably not the best example for learning how to make a package with upstart script.

  13. #13
    Registered User
    Join Date
    Feb 2011
    Posts
    21

    Re: Daemon

    If i have .upstart file in debian folder, then I run dpkg-buildpackage, where is dh_instalinit. If i copy my package to N900 and start App. manager or dpkg -i mypckage.deb I give message that I can't install this application because depends on upstart-job. I have PR1.3 and I reflash my N900, so i don't really know where is the problem

  14. #14
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Daemon

    Unfortunately nothing of what you are saying make sense for me.
    Show debian/control file of your package.

  15. #15
    Registered User
    Join Date
    Feb 2011
    Posts
    21

    Re: Daemon

    My control file:

    Source: georeminder
    Section: user/hidden
    Priority: optional
    Maintainer: Lukáš Aron <lukas.aron@gmail.com>
    Build-Depends: debhelper (>= 5), libqt4-dev
    Standards-Version: 3.7.3

    Package: georeminder
    Architecture: armel
    Depends: ${shlibsepends}, ${miscepends}
    Description: geoReminder is place management application
    Applicaten uses the daemon which take GPS position
    and look up in sqlite database the notification which
    contain the concrete position.

Page 1 of 2 12 LastLast

Similar Threads

  1. About Daemon/Services
    By dels in forum Python
    Replies: 0
    Last Post: 2009-01-13, 12:22
  2. Replies: 4
    Last Post: 2008-06-14, 17:51
  3. Testing daemon
    By charisse in forum Symbian C++
    Replies: 5
    Last Post: 2007-11-29, 22:16
  4. Daemon on 7650
    By converge in forum Symbian C++
    Replies: 1
    Last Post: 2002-12-03, 08:21
  5. Daemon process
    By abhishekmishra in forum Symbian C++
    Replies: 1
    Last Post: 2002-05-13, 14:27

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •