From owner-freebsd-questions Mon Nov 27 0:33:23 2000 Delivered-To: freebsd-questions@freebsd.org Received: from copernicus.tranquility.net (copernicus.tranquility.net [206.152.117.186]) by hub.freebsd.org (Postfix) with ESMTP id 89DC037B479 for ; Mon, 27 Nov 2000 00:33:20 -0800 (PST) Received: (from sid67@localhost) by copernicus.tranquility.net (8.11.1/8.11.1) id eAR8agw97272; Mon, 27 Nov 2000 02:36:42 -0600 (CST) (envelope-from sid67) Date: Mon, 27 Nov 2000 02:36:42 -0600 From: Ben Weaver To: david@banning.com Cc: questions@FreeBSD.ORG Subject: Re: automatic ftp put Message-ID: <20001127023642.A97243@tranquility.net> References: <200011270648.BAA01730@d.tracker> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <200011270648.BAA01730@d.tracker>; from david@www3.pacific-pages.com on Mon, Nov 27, 2000 at 01:48:18AM -0500 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I wanted to do the same thing with a site I was working on and updating frequently. Here's what I threw together: On my workstation I have a shell script called syncronize. Here it is: #!/bin/sh tar cvzf - directory_to_publish | ssh username@server ./server_sync Keep in mind for this to work, the directory_to_publish must be a subdirectory of the directory syncronize is in. You can change this as you like by altering the tar flags. On the server I made a shell script in my home directory called server_sync: #!/bin/sh dd of=tmp.tar.gz rm -R /path/to/website/root/directory/* tar xvzf tmp.tar.gz -C /path/to/website/root/directory/ rm tmp.tar.gz That's about it... It's pretty crude, but it works for what I need it to do. -Ben On Mon, Nov 27, 2000 at 01:48:18AM -0500, David Banning wrote: > I am trying to update my website automatically, but > as far as I can see, there is no way to use ftp from a script. > > Am am now looking at ssh/scp but I find it confusing. > > Can anyone suggest how I can do what I want? > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message