summaryrefslogtreecommitdiff
path: root/puppet/modules/obfsproxy/manifests/init.pp
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/obfsproxy/manifests/init.pp')
-rw-r--r--puppet/modules/obfsproxy/manifests/init.pp64
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"] ]
+ }
+
+
+}
+