For some reason my Ubuntu Server requires me to run /etc/init.d/networking restart each time I turn it on. I'm not sure why, but it does.
I have the following shell script called network.sh
Code:#/bin/bash #Shell script to restart network dameon on computer start echo "restarting network daemon" /etc/init.d/networking restart
First - is this okay? Will it work?
Second - How do I make this automatically run on startup?
-
-
Hi,
don't know what your prob is - can even be some active part after server (switch, router ...) loose cable, bad netmask ...lots reasons.
Anyway, if you want to do this - restart network after server is up - you need to make your own '/etc/init.d' script. Its a bit lengthy explanation, so you better google it. Or you can add the script, or things you want to run at the end of boot process to rc.local file.
How to do that is e.g. here:
https://help.ubuntu.com/community/RcLocalHowto
gl&hf -
OR....he could just add this to /etc/rc.local
Code:/etc/init.d/networking restart
-
Yeah, that's right, but as i understand it (dunno, since i don't use it - just read it somewhere..), *buntu doesn't have this file - that's why I posted the link there about rc.local howto
-
Restart Network on Startup
Discussion in 'Linux Compatibility and Software' started by millermagic, May 2, 2010.