diff options
author | irregulator <irregulator@riseup.net> | 2014-05-20 23:20:58 +0300 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-07-01 16:05:40 -0700 |
commit | 54fcafe131c411a49e4277cd0d14c6ea20044203 (patch) | |
tree | 9c1dfd9a8d789415d12190922646646486b40f42 /puppet/modules/obfsproxy/manifests/init.pp | |
parent | 82dbbf823d6637082f63e55ed1d2f57a11e0d481 (diff) |
Initial commit for obfsproxy server feature in platform
Diffstat (limited to 'puppet/modules/obfsproxy/manifests/init.pp')
-rw-r--r-- | puppet/modules/obfsproxy/manifests/init.pp | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/puppet/modules/obfsproxy/manifests/init.pp b/puppet/modules/obfsproxy/manifests/init.pp new file mode 100644 index 00000000..4deebb62 --- /dev/null +++ b/puppet/modules/obfsproxy/manifests/init.pp @@ -0,0 +1,64 @@ +class obfsproxy ( + $transport, + $port, + $param, + $dest_ip, + $dest_port +){ + + user { obfsproxy: + ensure => present, + system => true, + gid => obfsproxy, + } + + group { obfsproxy: + ensure => present, + system => true, + } + +# file { '/etc/default/obfsproxy': +# path => '/etc/default/obfsproxy', +# owner => 'root', +# group => 'root', +# mode => '0750', +# content => template('obfsproxy/etc_default_conf.erb'), +# } + + file { '/etc/init.d/obfsproxy': + path => '/etc/init.d/obfsproxy', + ensure => present, + source => 'puppet:///modules/obfsproxy/obfsproxy_daemon', + owner => 'root', + group => 'root', + mode => '0755', + require => File['/etc/obfsproxy.conf'], + subscribe => File['/etc/obfsproxy.conf'], + #content => template('obfsproxy/etc_init_d.erb'), + } + + file { '/etc/obfsproxy.conf': + path => '/etc/obfsproxy.conf', + ensure => present, + owner => 'root', + group => 'root', + mode => '0750', + content => template('obfsproxy/etc_conf.erb'), + } + + package { "obfsproxy": + ensure => present, + } + + service { "obfsproxy": + ensure => running, + status => '/usr/sbin/service obfsproxy status + | grep "is running"', + require => [ + Package["obfsproxy"], + File["/etc/init.d/obfsproxy"] ] + } + + +} + |