It's been a while since I've seen the init.d scripts for fedora.
You should look at /etc/init.d/iptables for the general layout.
A bash script tutorial:
http://www.tldp.org/LDP/abs/html/
(because you're gonna need it
sometime.)
The script needs to accept input commands "start" and "stop", with each running the appropriate command.
If I imagine I have a service I want to call "foobar" ... from cli I would normally start it with /sbin/fubar, and stop it with /sbin/fubar -k ... then I'd write a script (call it fubar) containing something like:
Code:
case $1 in
"start" )
/sbin/fubar
"stop" )
/sbin/fubar -k
esac
(I think - it's been a while)
Then it will start at the command: /etc/init.d fubar start ; and stop at the command /etc/init.d/fubar stop .
These scripts usually contain other lines to idiotproof it (which is why I called this example "fubar"). Normally there is more than one command that needs to be run for start and stop - you just stick in whatever the sequence of cli commands would be. You'll see that in the /etc/init.d/iptables script - there, the commands will be in a function (I'm guessing) which is called from the case/esac loop.
I have a suspicion this is not exactly what you want to do though.
This will start your script as a service - but what do you hope to acheive thus? Perhaps you just want MRTG started at boot?