On Thu, Oct 05, 2000 at 11:08:37AM -0700, David Erdman (derdman@forensica.com) wrote:
> hi. maybe a little off topic, but i would like to setup cron to go out and
> get the newest mozilla tarballs and install....
> so here is the script i wrote.
>
> #!bin/bash
This should be as follows, note leading slash. Not that it effects your
problem:
#!/bin/bash
^
> cd /usr/local
> rm -rf /usr/local/package
> wget ftp://ftp.mozilla.org/pub/mozilla/nightly/latest/mozilla-i686-pc-linux-gnu.tar.gz
> tar -zxvf /usr/local/mozilla-i686-pc-linux-gnu.tar.gz
> rm mozilla-i686-pc-linux-gnu.tar.gz
> chown -R erd /usr/local/package
> chgrp -R erd /usr/local/package
>
> the script works great if i just type sh /usr/bin/getmoz.
You should put locally written code in /usr/local/(s)bin, or possibly
~/bin (under your home directory).
> here is the cron job
> /etc/crontab
> 05 11 * * * root sh /usr/bin/getmoz
>
> when cron runs this, i can see that it is downloading the tarball...but
> thats about all it does.
Try adding:
set -v
...as the first line of your script. This will echo commands to stdout,
and should tell you what commands run. It's possible your script is
failing for any of a number of reasons, including (possibly) running out
of disk space. Mozilla is not a small package.
You might also avoid removing the download file until after you've
verified a successful untarring, possibly:
tar zxvf mozilla*.tar.gz && rm mozilla*.tar.gz || echo "tar failed"
> it doesnt seem to untar it in the /usr/local
> directory like i tell it to. (like it does by just typing sh /usr/bin/getmoz
> can anyone find anything wrong with this process (this is my very first
> script/cronjob!).
> thanks
>
>
> --
> Unsubscribe? mail -s unsubscribe debian-user-request@lists.debian.org < /dev/null
>
--
Karsten M. Self <kmself@ix.netcom.com> http://www.netcom.com/~kmself
Evangelist, Opensales, Inc. http://www.opensales.org
What part of "Gestalt" don't you understand? There is no K5 cabal
http://gestalt-system.sourceforge.net/ http://www.kuro5hin.org
GPG fingerprint: F932 8B25 5FDD 2528 D595 DC61 3847 889F 55F2 B9B0
Attachment:
pgplHEskWZWHy.pgp
Description: PGP signature