Find the answer to your Linux question:
Results 1 to 4 of 4
Most programs I get, self install and configure automatically, and are invoked by clicking on an ikon. I have a program, from a trusted source, that I must install manually, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Location
    Canada
    Posts
    37

    How to run a Program?


    Most programs I get, self install and configure automatically,
    and are invoked by clicking on an ikon.

    I have a program, from a trusted source, that I must
    install manually, and have no idea how...

    1) It goes in my Suse-10 router.

    2) It is a special server for private UDP packets. The program
    receives the packets from multiple sources, sorts, discards
    duplicates, and forwards them.

    3) I want it to automatically start with computer powerup.

    4) It is started and controlled by a command line, e.g.:
    "aysdispatcher -u -h 0.0.0.0 -p 5000 -H data.ayshub.net:1235 -D30 -v"

    5) I presume I run it as root, and I must open the appropriate ports.


    **** So ****

    1) Where do I put the program?

    2) How do I start it (on powerup).

    3) How do I submit other commands (via command line)?

    4) What else do I need to know?

    Sincerely
    /blair

  2. #2
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,378
    1) Where do I put the program?
    /usr/local/sbin
    If you take the effort to build a own RPM for it, then /usr/sbin
    Reason:
    You dont want to "spoil" the system with non-packaged files.

    2) How do I start it (on powerup).
    Preferably via an init script.
    Look at the existing ones for howtos

    3) How do I submit other commands (via command line)?
    Not sure what you mean.
    Arguments to the daemon?
    These go preferably into a config file and that config file to /etc
    If that daemon cannot parse a config file,
    add some variables at the beginning of the init script

    4) What else do I need to know?
    Dont run it as root, if you dont have to.
    If that thing has an exploit, your system is compromised.

    It binds to port 5000.
    That is above 1024.
    So a regular, isolated user for that purpose should do.
    Create and use a pid file to start/restart/stop the daemon

    Speaking of which, the daemon is indeed a daemon?
    ie: it detaches nicely from the calling shell?
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Location
    Canada
    Posts
    37
    Thanks, Irithori, for the excellent advice. It gets me
    going in the right direction.

    > 3) How do I submit other commands (via command line)?
    > Not sure what you mean.

    I mean, after it is started, if I want to type-in new arguments to it?
    Perhaps something like?:
    "/usr/local/sbin/aysdispatcher -u -h 0.0.0.0 -p 5001"

    > Create and use a pid file to start/restart/stop the daemon
    How do I do that? Where do they go?

    Sincerely
    /b

  4. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,378
    I mean, after it is started, if I want to type-in new arguments to it?
    Perhaps something like?:
    "/usr/local/sbin/aysdispatcher -u -h 0.0.0.0 -p 5001"

    Changing ports usually means restarting the daemon.


    > Create and use a pid file to start/restart/stop the daemon
    How do I do that? Where do they go?

    /var/run/<daemonname>.pid
    Look at the init scripts in /etc/rc.d/init
    Choose one and copy it.
    Then adjust it to the needs of your daemon
    You must always face the curtain with a bow.

Posting Permissions

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