Skip to content

Commit 707ed08

Browse files
committedDec 31, 2011
Just use give the config object to TT
1 parent f208687 commit 707ed08

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed
 

‎wre/lib/WRE/File.pm

+1
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ sub processTemplate {
332332
}
333333

334334
# add in some template template variables
335+
$var->{config} = $config;
335336
$var->{databaseHost} = $config->get("mysql/hostname");
336337
$var->{databasePort} = $config->get("mysql/port");
337338
$var->{nginxPort} = $config->get("nginx/port");

‎wre/var/setupfiles/my.cnf

+1-6
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ ft_min_word_len=2
1414
wait_timeout=600
1515
query_cache_size=32M
1616
default-character-set=utf8
17-
port=[% databasePort %]
18-
[% IF osName == "windows" %]
19-
pid-file=c:\data\wre\var\mysql.pid
20-
datadir=c:\data\wre\var\mysqldata
21-
lower_case_table_names=2
22-
[% END %]
17+
port=[% config.get(database/port) %]
2318
[% IF osName == "darwin" %]
2419
lower_case_table_names=2
2520
[% END %]

‎wre/var/setupfiles/nginx.conf

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
user [% wreUser %];
22
worker_processes 10;
33

4-
error_log [% wreRoot %]/var/logs/error.log;
4+
error_log [% config.getRoot %]/var/logs/error.log;
55

6-
pid [% wreRoot %]/var/run/nginx.pid;
6+
pid [% config.getRoot %]/var/run/nginx.pid;
77

88
events {
99
worker_connections 1024;
@@ -33,10 +33,10 @@ http {
3333
}
3434

3535
location ~ /.* {
36-
proxy_pass http://localhost:[% starmanPort %];
36+
proxy_pass http://localhost:[% config.get(starman/port) %];
3737
}
3838

3939
##Include per-server vhost configuration files.
40-
include [% wreRoot %]/etc/*.nginx
40+
include [% config.getRoot %]/etc/*.nginx
4141

4242
}

0 commit comments

Comments
 (0)