]> arthur.barton.de Git - backup-script.git/commitdiff
Set PATH to contain standard elements; call backup-script in same path
authorAlexander Barton <alex@barton.de>
Mon, 30 Sep 2013 11:45:32 +0000 (13:45 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 30 Sep 2013 11:45:32 +0000 (13:45 +0200)
bin/backup-script-wrapper

index 38ba1cdd1ee906f3a5ed8cb0c47ea97b912b04f3..61ef2434ead9561073dc775666e309e620722e8a 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # backup-script system for cloning systems using rsync
-# Copyright (c)2008-2011 Alexander Barton, alex@barton.de
+# Copyright (c)2008-2013 Alexander Barton, alex@barton.de
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,7 +16,10 @@ NAME="backup-script"
 HOST=`hostname`
 TMP="/tmp/$NAME.$$"
 
-backup-script $* >$TMP 2>&1
+PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
+export PATH
+
+`dirname "$0"`/backup-script $* >>$TMP 2>&1
 
 cat $TMP | mail -s "$HOST: $NAME results" "$MAILTO"