PDA

View Full Version : downloading script



bjseiler
09-13-2003, 04:26 PM
I had this problem and somebody else had the same so here is how I was able to download directadmin.

Every time I tried running the wget from the command line, it gave me errors so I just make a shell script to do it and then it worked for some reason.

Create a file get.sh and chmod 755 it.

#!/bin/sh
wget https://www.directadmin.com/cgi-bin/daupdate?lid=0000\&uid=000 -O /usr/local/directadmin/update.tar.gz

This only on two lines, make sure it is only on two lines in your editor.

at the prompt, run ./get.sh and it should work. Obvoiusly, replace the 000's with your lid and uid.

hostanet
09-13-2003, 07:22 PM
I tried the script with two lines and it would not work.
It did work however when I put it all on one line and made a script like you suggested!

wget https://www.directadmin.com/cgi-bin/daupdate?lid-xxxx\&uid=xxx \ -O /usr/local/directadmin/update.tar.gz

bjseiler
09-13-2003, 11:18 PM
Let me clarify,

#!/bin/sh is on one line
everything else is on the next

DirectAdmin Support
09-14-2003, 01:34 AM
Hello,

FreeBSD doesn't come with wget, it only has fetch, *but* fetch doesn't support https, which is needed for the download, SO, do the following first:

pkg_add -r wget

John

josetann
09-17-2003, 04:44 PM
Thanks! I was beating my head against the wall trying to get this to work. It downloaded something when I put quotes around the URL, but it definitely wasn't the full download. Putting it in a script worked.

DirectAdmin Support
09-17-2003, 05:35 PM
Hello,

I'm currently working on a much nicer download script that is OS independant (freebsd or redhat) and doesn't require any of that mess. :D Just download one file, run, and follow directions.

John

bjseiler
09-17-2003, 05:43 PM
How nice of you to call my oh so elegant script a "mess" :-)

DirectAdmin Support
09-17-2003, 05:57 PM
Hehe, the "mess" is from our installer.. the whole wget ?uid=123\&lid=1234 -O really long path.. etc etc.. is the mess im referring to :) ... new method:

get and run:
setup.sh

:D

John