WOL Script in rc_startup bricks the router, any ideas ??

Discussion in 'General Discussion' started by gabo21, Mar 6, 2005.

  1. gabo21

    gabo21 Network Guru Member

    ok, here's my rc_Startup script:

    while [ $i -le 30240 ]
    sleep 20
    i=`expr $i + 1`
    wget http://xxx.de/pc-1-on -O /tmp/pc-1-on
    wget http://xxx.de/pc-2-on -O /tmp/pc-2-on
    PC=`cat /tmp/pc-1-on`
    PC2=`cat /tmp/pc-2-on`
    /usr/sbin/wol -h $PC
    /usr/sbin/wol -h $PC2
    rm pc-1-on
    rm pc-2-on
    exit 0

    thr problem is: after one day, i have hundreds of processes running, called check_ps, which are flooding the memory until I can't even login because, there's no memory left to start a shell.
    since wol packets don't seem to be routeable with iptables, I use this way, because for SSH I would have to put the private-key on my server, without a password, to open a ssh-session via script

    btw, I use this script to wake up my pc's by visiting a website with a php-script, really easy
  2. scatman

    scatman Network Guru Member

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice