summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-08-01 12:31:57 -0700
committerelijah <elijah@riseup.net>2013-08-01 12:31:57 -0700
commit7d6893194cf1b6b8f4b3afa407d70dc90fe25f6c (patch)
tree50937e53491663bf28cfb53811849cf8b972f776
parentda191971398827f81ddb0dffd86d4a3c572f6386 (diff)
run soledad daemon using the configured port.
-rw-r--r--provider_base/services/soledad.json2
-rw-r--r--puppet/modules/soledad/manifests/server.pp11
-rw-r--r--puppet/modules/soledad/templates/default-soledad.erb4
3 files changed, 14 insertions, 3 deletions
diff --git a/provider_base/services/soledad.json b/provider_base/services/soledad.json
index e26e2667..6b41c128 100644
--- a/provider_base/services/soledad.json
+++ b/provider_base/services/soledad.json
@@ -1,6 +1,6 @@
{
"soledad": {
- "port": 2424,
+ "port": 2323,
"couchdb_admin_user": "= global.services[:couchdb].couch.users[:admin]",
"require_couchdb": "=> assert %(services.include? 'couchdb')"
},
diff --git a/puppet/modules/soledad/manifests/server.pp b/puppet/modules/soledad/manifests/server.pp
index 00fee4ac..ba482f29 100644
--- a/puppet/modules/soledad/manifests/server.pp
+++ b/puppet/modules/soledad/manifests/server.pp
@@ -13,6 +13,9 @@ class soledad::server {
$x509_cert = $x509['cert']
$x509_ca = $x509['ca_cert']
+ $soledad = hiera('soledad')
+ $soledad_port = $soledad['port']
+
x509::key { 'soledad':
content => $x509_key,
notify => Service['soledad-server'];
@@ -46,8 +49,12 @@ class soledad::server {
}
file { '/etc/default/soledad':
- content => "CERT_PATH=/etc/x509/certs/soledad.crt\nPRIVKEY_PATH=/etc/x509/keys/soledad.key\n",
- require => Package['soledad-server']
+ content => template('soledad/default-soledad.erb'),
+ owner => 'soledad',
+ group => 'soledad',
+ mode => '0600',
+ notify => Service['soledad-server'],
+ require => Class['soledad'];
}
service { 'soledad-server':
diff --git a/puppet/modules/soledad/templates/default-soledad.erb b/puppet/modules/soledad/templates/default-soledad.erb
new file mode 100644
index 00000000..da85338a
--- /dev/null
+++ b/puppet/modules/soledad/templates/default-soledad.erb
@@ -0,0 +1,4 @@
+# this file is managed by puppet
+CERT_PATH=/etc/x509/certs/soledad.crt
+PRIVKEY_PATH=/etc/x509/keys/soledad.key
+HTTPS_PORT=<%=@soledad_port%>