Skip to content
Permalink
Browse files

Add feedback about what the setup script is doing.

  • Loading branch information...
perlDreamer committed Jan 6, 2012
1 parent ff3d618 commit fec7f793b92426c249aa8a41885cfedac3fa557d
Showing with 11 additions and 3 deletions.
  1. +11 −3 wre/sbin/wresetup.pl
@@ -20,6 +20,8 @@

my $help;

use 5.010;

Getopt::Long::GetOptions(
'help'=>\$help
);
@@ -32,22 +34,28 @@
my $host = WRE::Host->new(wreConfig => $config);
my $file = WRE::File->new(wreConfig => $config);

say "Setting up demo files";
$file->makePath($config->getDomainRoot("/demo"));
$file->copy($config->getRoot("/var/setupfiles/demo.nginx"), $config->getRoot("/etc/demo.nginx"),
{ force => 1, templateVars=>{ sitename=>$config->get("demo/hostname") } });
say "Setting up nginx main config";
$file->copy($config->getRoot("/var/setupfiles/nginx.conf"),
$config->getRoot("/etc/nginx.conf"),
{ force => 1, templateVars=>{osName=>$host->getOsName} });
$file->copy($config->getRoot("/var/setupfiles/mime.types"),
$config->getRoot("/etc/mime.types"),
{ force => 1 });
say "Setting up nginx per-site config";
$file->copy($config->getRoot("/var/setupfiles/nginx.template"),
$config->getRoot("/var/nginx.template"),
{ force => 1 });
say "Setting up mime.types file";
$file->copy($config->getRoot("/var/setupfiles/mime.types"),
$config->getRoot("/etc/mime.types"),
{ force => 1 });
say "Setting up logrotate file";
$file->copy($config->getRoot("/var/setupfiles/wre.logrotate"),
$config->getRoot("/var/wre.logrotate"),
{ force => 1 });

say "Setting up Spectre config";
$file->copy($config->getWebguiRoot("/etc/spectre.conf.original"), $config->getWebguiRoot("/etc/spectre.conf"),
{ force => 1 });
$file->changeOwner($config->getWebguiRoot("/etc"));

0 comments on commit fec7f79

Please sign in to comment.
You can’t perform that action at this time.