summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2011-06-15 18:28:18 -0700
committerBob Gilligan <gilligan@vyatta.com>2011-06-15 18:28:18 -0700
commit934f5ca6af3e7c603be04df3d5212bd228d00e49 (patch)
tree7f235e175073537c4effb62e381258cd86a3b20f /scripts
parent9d095443921c0414def931591595f9903e90af83 (diff)
downloadvyatta-cfg-vpn-934f5ca6af3e7c603be04df3d5212bd228d00e49.tar.gz
vyatta-cfg-vpn-934f5ca6af3e7c603be04df3d5212bd228d00e49.zip
Bugfix 6767: Move /tmp/ipsec.log to /var/log/vyatta and rotate it.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vpn-config.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl
index f2430f7..a4a2428 100755
--- a/scripts/vpn-config.pl
+++ b/scripts/vpn-config.pl
@@ -51,6 +51,7 @@ my $CA_CERT_PATH = '/etc/ipsec.d/cacerts';
my $CRL_PATH = '/etc/ipsec.d/crls';
my $SERVER_CERT_PATH = '/etc/ipsec.d/certs';
my $SERVER_KEY_PATH = '/etc/ipsec.d/private';
+my $LOGFILE = '/var/log/vyatta/ipsec.log';
my $vpn_cfg_err = "VPN configuration error:";
my $clustering_ip = 0;
@@ -1204,8 +1205,8 @@ sub write_config {
sub vpn_exec {
my ( $command, $desc ) = @_;
- open my $logf, '>>', "/tmp/ipsec.log"
- or die "Can't open /tmp/ipsec.log: $!";
+ open my $logf, '>>', $LOGFILE
+ or die "Can't open $LOGFILE: $!";
use POSIX;
my $timestamp = strftime( "%Y-%m-%d %H:%M.%S", localtime );
@@ -1258,8 +1259,8 @@ sub vpn_exec {
sub vpn_log {
my ($log) = @_;
- open my $logfile, '>>', "/tmp/ipsec.log"
- or die "Can't open /tmp/ipsec.log: $!";
+ open my $logfile, '>>', $LOGFILE
+ or die "Can't open $LOGFILE: $!";
use POSIX;
my $timestamp = strftime( "%Y-%m-%d %H:%M.%S", localtime );