[svlug] bash scripts and cron

Andrew Bertola drew at drewb.com
Fri Jan 10 17:02:53 PST 2003


On Fri, 2003-01-10 at 12:56, Robert Hajime Lanning wrote:
> On Fri, 10 Jan 2003, John McDonnell wrote:
> > It's a simple tar and scp script and it looks fine to me. This is on 5
> > different Cobalt Raqs. What happens is that tar runs fine, but the scp
> > never happens.
> >
> > Anyone able to point out the obvious? I've made sure the keypairs are
> > all happy.
> 
> Make sure scp is in the path.  Your /etc/profile or .profile probably
> adds the path that scp resides in.  crond does not run the profiles.
> You may need to either add the path to PATH or run scp fully qualified.

Or just source /etc/profile (or wherever it resides on a RAQ) at the top
of the script.

#!/bin/bash

. /etc/profile

host=raq3
dest=backup.server.foo
port=6077

...

-- 
+---------------------- T h e C o o p . n e t ----------------------+
| Drew Bertola         Hosting - Colocation      Tel:  408-738-8337 |
| TheCoop.net      Programming - Administration  Mob:  408-887-0426 |
| drew at thecoop.net    Open Source Specialists    http://thecoop.net |
+-------------------------------------------------------------------+





More information about the svlug mailing list