UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I need to create a daemon and I don't know how. I want to implement the RIP protocol, to connect my ubuntu distribution with a router, so I need to convert this protocol into a daemon. Any help?
while true;
do
... code goes here
.... blah blah.. echo "hi Im a daemon" > /var/log/daemon.log
.. blah more code..
done
There's definitely another more (correct) way to make an actual daemon, but this is the easy way. It's an infinite loop to do the stuff you need done, and when started with an '&' symbol, the shell will fork it into the background like a daemon.
Eg:
Good point.. In my own daemon I made, I put a 'sleep 10' in the beginning, so the thing only looped every 10 seconds and then slept again.. In any event, the resource usage is undetectable.
I'm a total n00b in linux, so I don't understand what you did. I saw in other forums and some documents about a daemon called routed that manage RIP and I would like to know how to implement that.
Could you give a step by step answer? Thank you.
I need to make a router in linux with DHCP, DNS, NAT, FIREWALL and dynamic routing. DHCP, DNS, NAT and the FIREWALL it's already working, but the medular problem now it's the dynamic routing. I hope you could give me an step by step answer.
Yikes TraFFikko: Well, what you need as far as I know, is a firewall capable of dynamically altering the IPtables/IPchains on the fly. Doing this is well beyond my abilities, but you will get *some* information from Googling, and I'm sure there are other related threads here on LQ.
Don't quote me, but something like Guarddog or Smoothwall *might* be along the lines of what you seek.
Sorry I can't help on this subject, but there are some very able people around here and hopefully one or more of them will pick up on this and be able to offer some good advice.
Best of luck!
P.S. - You would do well to post in the Networking forum.
Last edited by GrapefruiTgirl; 04-26-2007 at 06:06 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.