]> gitweb.fluxo.info Git - puppet-tor.git/commitdiff
make sure that the control port's hashed password is not empty
authorMicah Anderson <micah@riseup.net>
Wed, 14 Mar 2012 15:45:52 +0000 (11:45 -0400)
committerMicah Anderson <micah@riseup.net>
Wed, 14 Mar 2012 15:57:25 +0000 (11:57 -0400)
manifests/daemon.pp

index 9da426b19eec2e141e6a3fa1438a56bd55b904e5..5f4e06491ca65c43c5eb23b6e8298adac6f19e02 100644 (file)
@@ -123,6 +123,11 @@ class tor::daemon inherits tor {
   define control( $port                    = 0,
                   $hashed_control_password = '',
                   $ensure                  = present ) {
+
+    if $hashed_control_password == '' and $ensure != 'absent' {
+      fail("You need to define the tor control password")
+    }
+    
     concatenated_file_part { '04.control':
       dir     => $tor::daemon::snippet_dir,
       content => template('tor/torrc.control.erb'),