On 2011-11-20 13.54, Mark Benson wrote:
On 20 Nov 2011, at 11:24, hvlems at zonnet.nl wrote:
Another feature which would be nice to add generally is something which periodically
re-resolves the DNS names in the config file to IP addresses, so that people who use
something like DynDNS because they don t have a fixed IP address, can use it more easily
and not fall off the network for too long when their IP address changes. Presumably
calling the SIGHUP handler (read_conf) every so often would do the trick.
Feel free. It's not overly complicated. However, make that optional, as maybe not all
want that enabled. If DNS lookups take a while (which they definitely do when DNS is
having problems), you'll hang the bridge while it's trying to resolve stuff.
It would also be nice to make the code a bit more portable so that it will compile and run
on more platforms without modification, a bit like SIMH.
Any changes to make it more portable are always welcome. Just make sure you put the stuff
in conditionals, so that the same source still compiles and works on the other platforms.
While we are talking about improvements, would it be possible to make it search a few
default locations on Linux/BSD for a config file? Currently you have to start it by cd-ing
to the directory the binary is in as it looks at the current directory for the config
file - if you start it from another place if fails.
Perhaps looking in /etc/hecnet or another place you can specify at compile time would be
better?
That is easy. Just change the source before compiling, and there you have it. Definitely a
compile time thingy, and extremely easy to "fix".
Also would it be difficult or counter-productive to roll the Port configuration into the
config file instead of having to specify it at runtime?
If you don't want it on the command line, you can just assign it in the code as a
constant. Very easy. :-)
Lastly does anyone know how to roll a init.d script for it to set it as a service in
Debian/Ubuntu (10.04)?
Not sure which variant of init debian uses offhand, but in general you just write a small
shellscript that don't do much more than just run the command line the same way you do
by hand. Grab some other simple service and copy the startup, and then change the command
line.
It's ridiculously simple.
Show replies by date