9 use File::Path qw(make_path);
11 my $account = shift || die "Usage: $0 <account> <user1> <user2> <user3> <...>\n";
13 # Temporary hack to support custom Domains
15 $custDomain = 'bnsnet.ca' if ($account eq 'blacklock');
17 my $domain = 'user.planetofnix.com';
22 gitAuthor => $account,
23 gitEmail => $account . "@" . $domain,
24 gitWorkDir => "./configNow/$account",
25 ipv4 => '38.87.162.191',
26 ipv6 => '2602:fccf:1:1191::',
28 custDomain => $custDomain,
29 StageDir => './stageNow',
30 DeployDir => './deployNow/',
31 Accounts => [ $account ], # List of accounts to deploy
34 my $shellConfig = new IRCNOW::ConfigNow( %config );
36 #die Dumper($shellConfig->{lists});
38 if ($shellConfig->repo_ready()) {
39 $shellConfig->write_config();
40 $shellConfig->repo_commit();
42 print "Your ConfigNow git repo is not ready. Please review and commit the pending changes.\n"
43 . $shellConfig->repo_status()
47 print "\n" . $shellConfig->repo_log();
50 if ($shellConfig->stage_ready()) { # Verify stage repo is ready
52 print "Deploying config Change.\n";
53 $shellConfig->stage_pull($account => "../configNow/$account");
54 $shellConfig->stage_merge();
55 $shellConfig->stage_commit();
56 $shellConfig->deploy_system();
61 # Get list of files changed in a diff
62 #$r->run(qw(git diff 0cd562e --name-only));