freeside/FS/bin freeside-daily,1.13,1.14
ivan
ivan at pouncequick.420.am
Wed Jun 30 03:02:48 PDT 2004
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory pouncequick:/tmp/cvs-serv25065/bin
Modified Files:
freeside-daily
Log Message:
add option to pgp/gpg encrypt scp dumps
Index: freeside-daily
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-daily,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- freeside-daily 5 Mar 2004 05:59:16 -0000 1.13
+++ freeside-daily 30 Jun 2004 10:02:45 -0000 1.14
@@ -63,7 +63,6 @@
}
}
-#local hack
my $conf = new FS::Conf;
my $dest = $conf->config('dump-scpdest');
if ( $dest ) {
@@ -75,7 +74,18 @@
} else {
die "database dumps not yet supported for ". driver_name;
}
- scp("/var/tmp/$database.sql", $dest);
+ if ( $conf->config('dump-pgpid') ) {
+ eval 'use GnuPG';
+ my $gpg = new GnuPG;
+ $gpg->encrypt( plaintext => "/var/tmp/$database.sql",
+ output => "/var/tmp/$database.gpg",
+ recipient => $conf->config('dump-pgpid'),
+ );
+ scp("/var/tmp/$database.gpg", $dest);
+ unlink "/var/tmp/$database.gpg" or die $!;
+ } else {
+ scp("/var/tmp/$database.sql", $dest);
+ }
unlink "/var/tmp/$database.sql" or die $!;
}
More information about the freeside-commits
mailing list