Skip to content

Commit 055ebfd

Browse files
committed
Initial commit.
0 parents  commit 055ebfd

File tree

6 files changed

+55
-0
lines changed

6 files changed

+55
-0
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Mac OS X
2+
.DS_Store
3+
4+
# Node.js
5+
node_modules/*
6+
npm-debug.log

.npmignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
README.md
2+
Makefile
3+
doc/
4+
examples/
5+
test/
6+
7+
# Mac OS X
8+
.DS_Store
9+
10+
# Node.js
11+
.npmignore
12+
node_modules/
13+
npm-debug.log
14+
15+
# Git
16+
.git*

instructions/default.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = function(options) {
2+
var ensure = options.ensure || 'installed'
3+
, version = options.version;
4+
5+
return function(sys) {
6+
7+
this.package('nginx', {
8+
ensure: ensure,
9+
version: version
10+
});
11+
12+
}
13+
}

instructions/vhost.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = function(options) {
2+
var host = options.host
3+
, confFile = options.confFile || 'vhost.ejs'
4+
5+
return function(sys) {
6+
var path = '/etc/nginx/sites-available/' + host;
7+
8+
this.file(path, {
9+
content: this.template(confFile, {
10+
host: host
11+
})
12+
});
13+
}
14+
}

manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

templates/vhost.ejs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
server {
2+
server_name <%- host %>;
3+
4+
root /var/www/<%- host %>/html;
5+
}

0 commit comments

Comments
 (0)