Permalink
Browse files

apd mostly written. need to do more testing.

  • Loading branch information...
1 parent 536cade commit 263c1ba7300ab6ef6a7ecc9a0ad647d3e5b06c3b @uberj committed Nov 30, 2011
Showing with 32 additions and 0 deletions.
  1. BIN php_apd/files/apd_1.0.1_i386.deb
  2. +32 −0 php_apd/manifests/init.pp
Binary file not shown.
@@ -0,0 +1,32 @@
+# I'm pretty much modeling what this guy did: http://lzone.de/node/4
+
+class php_apd {
+ $php_ini = "/etc/php5/cli/php.ini"
+ $trace_dir = "/tmp/apd_traces"
+
+ package {'php5':
+ ensure => present,
+ }
+
+ package {'apd':
+ ensure => present,
+ provider => dpkg,
+ #source => "puppet://puppet/php_apd/files/apd_1.0.1_i386.deb",
+ source => "/etc/puppet/modules/php_apd/files/apd_1.0.1_i386.deb",
+ }
+ #zend_extension=/usr/lib/php5/20090626+lfs/apd.so
+ #apd.statement=1
+ #apd.tracedir=/tmp/apd-traces
+ exec { 'zend_extensions':
+ unless => "/bin/grep zend_extension=/usr/lib/php5/20090626+lfs/apd.so ${php_ini}",
+ command => "/bin/echo 'zend_extension=/usr/lib/php5/20090626+lfs/apd.so' >> ${php_ini}",
+ }
+ exec { 'apd enable':
+ unless => "/bin/grep apd.statement=1 ${php_ini}",
+ command => "/bin/echo 'apd.statement=1' >> ${php_ini}",
+ }
+ exec { 'tracedir':
+ unless => "/bin/grep apd.tracedir=${trace_dir} ${php_ini}",
+ command => "/bin/echo 'apd.tracedir=${trace_dir}' >> ${php_ini}",
+ }
+}

0 comments on commit 263c1ba

Please sign in to comment.