Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 1998 17:25:50 -0500
From:      "Frank Griffith" <frankg@idfw.com>
To:        <freebsd-questions@FreeBSD.ORG>
Subject:   Need help with sh script
Message-ID:  <001201bde677$f65675c0$0200a8c0@fast1.dfw.com>

next in thread | raw e-mail | index | archive | help
I am no programmer but I finally came across enough information
to put together a script which will determine my latest Dynamic IP
address from my ISP and prepare an HTML document with a link
to this IP address in it. The script wilI then ftp the HTML doc to my
server where I keep a static IP. Everyone follow so far?

I call the script dyn

Problem is I get to the last step and something goes wrong. Here
are the important parts of the script.


#!/bin/sh
#
$REMOTE_SERVER="ftp.idfw.com"
$TMPDIR="/usr/tmp"
$TSCPT="ftp.script"
.
.
.
#Here's where the FTP script is supposed to take over
ftp $REMOTE_SERVER > $TMPDIR/$TSCPT &/dev/null
#
# note: the script will run and exit without error if the above
# line is remarked out.
.
.
.
exit

When the script starts to FTP the file I get this error message:

    ./dyn:  /dev/null:  permission denied

----------------------------------------------------------------------------
--------
The ftp.script file referenced is a small text file like this:

    put /usr/tmp/myip.htm /html/myip.html
    quit
----------------------------------------------------------------------------
--------
I run the script as root. My /root directory contains a file called
.netrc and it looks like this:

    default login login_id password pass_word

I use my regular login_id and pass_word with superuser rights
in this command line
----------------------------------------------------------------------------
--------

This thing makes a beautiful HTML page with my dynamic IP
address linked on it. If someone can steer me in the right
direction here on what's wrong, I'll be glad to share the whole
script with everyone once I get it working. Thanks.





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?001201bde677$f65675c0$0200a8c0>