|
-
Apr 8th, 2007, 09:18 AM
#1
Thread Starter
Hyperactive Member
[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.
-
Apr 8th, 2007, 01:49 PM
#2
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.
-
Apr 8th, 2007, 02:35 PM
#3
Thread Starter
Hyperactive Member
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.
-
Apr 8th, 2007, 03:48 PM
#4
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________(___)____
__(___)_________) _/_____
___\_ (_________(_/______
____\_)_________________
-
Apr 9th, 2007, 02:22 AM
#5
Fanatic Member
Re: Fedora Core 5 Services

Are you running an Enemy Territory server?
-
Apr 9th, 2007, 05:29 AM
#6
Thread Starter
Hyperactive Member
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.
-
Apr 9th, 2007, 06:01 AM
#7
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.
-
Apr 9th, 2007, 06:14 AM
#8
Thread Starter
Hyperactive Member
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.
-
Apr 10th, 2007, 07:16 AM
#9
Hyperactive Member
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
-
Apr 10th, 2007, 07:21 AM
#10
Thread Starter
Hyperactive Member
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.
-
Apr 10th, 2007, 07:22 AM
#11
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|