Results 1 to 11 of 11

Thread: [RESOLVED] Fedora Core 5 Services

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Resolved [RESOLVED] Fedora Core 5 Services

    Okay, so, my server's got FD5 on it, and, I need to make a service to run on it.

    ie. service NAME start

    I know you can replicate this with shell scripts, but actual services.. help?

    Thanks !
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Fedora Core 5 Services

    You need to clarify. Are you writing the service itself, or do you already have the service but cannot make it run?
    I don't live here any more.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: Fedora Core 5 Services

    I basically want a normal application to run as a service.

    ie. I have an executable (etded), that can be run from, for example, /home/et/etded

    Is it possible to just make it into a service as to have start stop status commands? Or does that need to be done in a more in-depth way? (Probably the latter)
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

  4. #4
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: Fedora Core 5 Services

    The one I know of is starting a process with an ampersand that makes it run in the back ground like /home/et/etded &
    __________________
    ________________0îîî___
    ___îîî0________(___)____
    __(___)_________) _/_____
    ___\_ (_________(_/______
    ____\_)_________________

  5. #5
    Fanatic Member
    Join Date
    May 2005
    Posts
    898

    Re: Fedora Core 5 Services



    Are you running an Enemy Territory server?

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: Fedora Core 5 Services

    I'm already running 12 ET servers, however I'm also running FEAR servers and CS:S.

    That was just an example
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

  7. #7
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Fedora Core 5 Services

    Services (daemons) are normally written especially. Normal apps generally aren't suitable for that task.
    I don't live here any more.

  8. #8

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: Fedora Core 5 Services

    I'll just keep using sh /path/start.sh then =/

    Thanks
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

  9. #9
    Hyperactive Member CyberSurfer's Avatar
    Join Date
    Aug 2000
    Location
    Old London Town
    Posts
    425

    Re: Fedora Core 5 Services

    Instead of writing a service, you can use an init.d script to do what you want...Basically, an init.d script is a startup script that runs whenever your system boots up. To create one, use the following steps:

    First of all, create a file in /etc/init.d called whatever you want the name of the service to be, for example apache...then in that file, put something like the following :

    Code:
    #!/bin/sh
    case $1 in
    'start' )
       #Startup command for your app
       /this/is/an/example/command.sh
       ;;
    'stop' )
       #nameofyourapp should be changed to match whatever name your app is listed under when running.
       ps -ef | grep nameofyourapp | awk '{print $2}' | xargs kill -9
       ;;
    *)
       echo "usage: `basename $0` {start|stop}"
    esac
    Then run the following command (again using apache as the example script name):

    chkconfig --add apache

    This will then set the script to be started whenever your system starts.

    Additionally, you can now start and stop your app by using the following commands, again assuming apache was the name of your script:

    To start:
    /etc/init.d/apache start

    To stop:
    /etc/init.d/apache stop

  10. #10

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2006
    Location
    Ubuntu Haters Club
    Posts
    405

    Re: Fedora Core 5 Services

    Thanks, that helped a bunch!
    » Twitter: @rudi_visser : Website: www.rudiv.se «

    If Apple fixes security flaws, they are heralded as proactive. If Microsoft fixes a security flaw, they finally got around to fixing their buggy OS.

  11. #11
    Hyperactive Member CyberSurfer's Avatar
    Join Date
    Aug 2000
    Location
    Old London Town
    Posts
    425

    Re: [RESOLVED] Fedora Core 5 Services

    No problem

Posting Permissions

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



Click Here to Expand Forum to Full Width