Restarting a network using telnet.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mrdude
    V.I.P. Member
    • Jul 2008
    • 110

    #1

    Restarting a network using telnet.

    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 ] &amp;&amp; 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>&amp;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?
    Suck my plums
Working...