|
20 | 20 |
|
21 | 21 | my $help;
|
22 | 22 |
|
| 23 | +use 5.010; |
| 24 | + |
23 | 25 | Getopt::Long::GetOptions(
|
24 | 26 | 'help'=>\$help
|
25 | 27 | );
|
|
32 | 34 | my $host = WRE::Host->new(wreConfig => $config);
|
33 | 35 | my $file = WRE::File->new(wreConfig => $config);
|
34 | 36 |
|
| 37 | +say "Setting up demo files"; |
35 | 38 | $file->makePath($config->getDomainRoot("/demo"));
|
36 | 39 | $file->copy($config->getRoot("/var/setupfiles/demo.nginx"), $config->getRoot("/etc/demo.nginx"),
|
37 | 40 | { force => 1, templateVars=>{ sitename=>$config->get("demo/hostname") } });
|
| 41 | +say "Setting up nginx main config"; |
38 | 42 | $file->copy($config->getRoot("/var/setupfiles/nginx.conf"),
|
39 | 43 | $config->getRoot("/etc/nginx.conf"),
|
40 | 44 | { force => 1, templateVars=>{osName=>$host->getOsName} });
|
41 |
| -$file->copy($config->getRoot("/var/setupfiles/mime.types"), |
42 |
| - $config->getRoot("/etc/mime.types"), |
43 |
| - { force => 1 }); |
| 45 | +say "Setting up nginx per-site config"; |
44 | 46 | $file->copy($config->getRoot("/var/setupfiles/nginx.template"),
|
45 | 47 | $config->getRoot("/var/nginx.template"),
|
46 | 48 | { force => 1 });
|
| 49 | +say "Setting up mime.types file"; |
| 50 | +$file->copy($config->getRoot("/var/setupfiles/mime.types"), |
| 51 | + $config->getRoot("/etc/mime.types"), |
| 52 | + { force => 1 }); |
| 53 | +say "Setting up logrotate file"; |
47 | 54 | $file->copy($config->getRoot("/var/setupfiles/wre.logrotate"),
|
48 | 55 | $config->getRoot("/var/wre.logrotate"),
|
49 | 56 | { force => 1 });
|
50 | 57 |
|
| 58 | +say "Setting up Spectre config"; |
51 | 59 | $file->copy($config->getWebguiRoot("/etc/spectre.conf.original"), $config->getWebguiRoot("/etc/spectre.conf"),
|
52 | 60 | { force => 1 });
|
53 | 61 | $file->changeOwner($config->getWebguiRoot("/etc"));
|
|
0 commit comments