mrdude
27th April, 2009, 01:18 AM
Hey guys I'm using pli jade 2 and am working on a new ppanel as sometimes when I use the restart network feature on the main menus it doesn't work unless the box gets rebooted.
Instead of rebooting the box I was thinking something like this would work:
<execute name="Restart Network"
target="echo Network Restarted - exit to test;
[ ! -e /var/etc/hostname ] && cp /var_init/etc/hostname /var/etc/hostname;
/bin/hostname -F /var/etc/hostname;
/sbin/ifconfig lo 127.0.0.1 netmask 255.0.0.0 up;
/bin/setupnetwork > /tmp/iplog.log 2>&1;"
helptext="Restarts network incase of failure"/>
Would that work? my network seems to work mostly all the time but a manual restart is sometimes needed if I am messing with my router - does that code look ok or am I missing something?
Instead of rebooting the box I was thinking something like this would work:
<execute name="Restart Network"
target="echo Network Restarted - exit to test;
[ ! -e /var/etc/hostname ] && cp /var_init/etc/hostname /var/etc/hostname;
/bin/hostname -F /var/etc/hostname;
/sbin/ifconfig lo 127.0.0.1 netmask 255.0.0.0 up;
/bin/setupnetwork > /tmp/iplog.log 2>&1;"
helptext="Restarts network incase of failure"/>
Would that work? my network seems to work mostly all the time but a manual restart is sometimes needed if I am messing with my router - does that code look ok or am I missing something?