<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
#!/bin/bash<br>
<br>
HOST="windowshostname"<br>
<br>
CMD="ping -c1 $HOST"<br>
CMD_RET=`$CMD`<br>
# echo $CMD_RET<br>
NOWDATE=`date +%Y%m%d`<br>
<br>
if [ -f ping_check.txt ];<br>
then<br>
FILEDATE=`cat ping_check.txt`<br>
else<br>
FILEDATE=0<br>
fi<br>
<br>
if [ $NOWDATE -ne $FILEDATE ];<br>
then<br>
if [[ $CMD_RET =~ ", 0% packet loss" ]]<br>
then<br>
echo "$HOST pinged ..."<br>
echo $NOWDATE > ping_check.txt<br>
# run backup script<br>
else<br>
echo "$HOST did not ping ..."<br>
fi<br>
fi<br>
<br>
exit<br>
<br>
<br>
<br>
On 01/03/2011 03:04 PM, Raymond Norton wrote:
<blockquote
cite="mid:25760621.01294088660382.JavaMail.root@mail.lctn.org"
type="cite">
<style type="text/css">p { margin: 0; }</style>
<style type="text/css">body { font-family: 'Times New Roman'; font-size: 12pt; color: #000000}</style>Yes,
it will have the same address . I would prefer to run it from the
backup server, but am open to anything that is simple.<br>
<br>
<br>
----- "Justin Krejci" <jus@krytosvirus.com> wrote:
<br>
> Does the windows XP machine always have the same IP address or at
least on the same subnet as the backup server when it is online?<br>
> <br>
> Can you possibly have the Windows XP host run a script
automatically when it is online that will trigger the backup process?<br>
> <br>
> -----Original Message-----<br>
> <b>From</b>: Raymond Norton <<a moz-do-not-send="true"
href="mailto:Raymond%20Norton%20%3cadmin@lctn.org%3e" target="_blank">admin@lctn.org</a>><br>
> <b>Reply-to</b>: TCLUG Mailing List
<a class="moz-txt-link-rfc2396E" href="mailto:tclug-list@mn-linux.org"><tclug-list@mn-linux.org></a><br>
> <b>To</b>: <a moz-do-not-send="true"
href="mailto:tclug-list@mn-linux.org" target="_blank">tclug-list@mn-linux.org</a><br>
> <b>Subject</b>: [tclug-list] script help<br>
> <b>Date</b>: Mon, 03 Jan 2011 14:21:21 -0600<br>
> <b>Mailer</b>: Mozilla/5.0 (X11; U; Linux i686; en-US;
rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4<br>
> <br>
>
<pre>I need to come up with a shell script that will launch another script
when a specific host is detected on the network. This is for an network
backup system. The host is always off-line when the back up runs at the
night and I want to fire the backup off when it comes back on-line.
The script would run on the backup server as a cron job, and needs to
call the backup script only once per day.
The backup server is Linux. The host is Windows XP.
_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
<a moz-do-not-send="true" href="mailto:tclug-list@mn-linux.org"
target="_blank">tclug-list@mn-linux.org</a>
<a moz-do-not-send="true"
href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list"
target="_blank">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a>
</pre>
<br>
> -- <br>
> This message has been scanned for viruses and
<br>
> dangerous content by
<a moz-do-not-send="true" href="http://www.mailscanner.info/"
target="_blank"><b>MailScanner</b></a>, and is
<br>
> believed to be clean.
<br>
> _______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
<a class="moz-txt-link-abbreviated" href="mailto:tclug-list@mn-linux.org">tclug-list@mn-linux.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a>
<br>
<br>
-- <br>
Raymond Norton<br>
LCTN<br>
Ecclesiastes 7:21-22<br>
<br>
</jus@krytosvirus.com>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
<a class="moz-txt-link-abbreviated" href="mailto:tclug-list@mn-linux.org">tclug-list@mn-linux.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.mn-linux.org/mailman/listinfo/tclug-list">http://mailman.mn-linux.org/mailman/listinfo/tclug-list</a>
</pre>
</blockquote>
</body>
</html>