summaryrefslogtreecommitdiff
path: root/bin/confdiff
blob: 5b6af859e2a221732a80e351bb7567fd9ae650d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl

use FS::UID qw(adminsuidsetup);
use FS::Conf;

adminsuidsetup('ivan');

my $conf = new FS::Conf;

my $file2 = pop @ARGV;
my $file1 = pop @ARGV;

open(FILE1, ">/tmp/$file1") or die "can't open /tmp/$file1: $!";
print FILE1 $conf->config($file1);
print FILE1 "\n";
close FILE1 or die $!;

open(FILE2, ">/tmp/$file2") or die "can't open /tmp/$file2: $!";
print FILE2 $conf->config($file2);
print FILE2 "\n";
close FILE2 or die $!;

my @opt = @ARGV;

system('diff', @opt, "/tmp/$file1", "/tmp/$file2");

#unlink("/tmp/$file1', "/tmp/$file2");