Results 1 to 3 of 3

Thread: Script help wakeonlan

  1. #1
    Join Date
    Feb 2012
    Beans
    81

    Script help wakeonlan

    Hi I want to modify this start script to that it only runs if the remote computer is off.

    #!/bin/bash

    /usr/bin/wakeonlan xxxxxxx

    sleep 60

    exit



    I presume some sort of if statement required?

  2. #2
    Join Date
    Feb 2012
    Beans
    81

    Re: Script help wakeonlan

    is it something like ping -q -c1 -W5 ?

  3. #3
    Join Date
    Feb 2012
    Beans
    81

    Re: Script help wakeonlan

    The below seems to work from the command line but I cant get it to work on start up.


    ping -c 2 -s 100 -w 1 192.168.0.2 >/dev/null
    if [ $? -eq 1 ] ; then
    /usr/bin/wakeonlan 00:1d:92:dd:1a:0d
    sleep 45
    else
    echo 'one'
    fi

    exit 0

    tried it in rc.local & /etc/xbmc/live.d no joy.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •