rename nfs-server to nfs_server
[mirror/dsa-puppet.git] / modules / vsftpd / manifests / site.pp
index 338a592..4adb08a 100644 (file)
@@ -3,19 +3,22 @@ define vsftpd::site (
        $bind='',
        $chown_user='',
        $writable=false,
+       $writable_other=false,
        $banner="${name} FTP Server",
        $max_clients=100,
        $logfile="/var/log/ftp/vsftpd-${name}.debian.org.log",
        $ensure=present
 ){
 
-       include vsftpd::nolisten
+       include vsftpd
 
        case $ensure {
                present,absent: {}
                default: { fail ( "Invald ensure `$ensure' for $name" ) }
        }
 
+       $ftpsite = $name
+
        $fname = "/etc/vsftpd-${name}.conf"
 
        file { $fname:
@@ -24,8 +27,14 @@ define vsftpd::site (
        }
 
        file { "/etc/logrotate.d/vsftpd-${name}":
-               ensure  => $ensure,
-               content => template('vsftpd/logrotate.erb')
+               ensure => absent
+       }
+
+       munin::check { "vsftpd-${name}":
+               script => 'vsftpd'
+       }
+       munin::conf { "vsftpd-${name}":
+               content => template('vsftpd/munin.erb')
        }
 
        # We don't need a firewall rule because it's added in vsftp.pp
@@ -33,11 +42,12 @@ define vsftpd::site (
                bind        => $bind,
                id          => "${name}-ftp",
                server      => '/usr/sbin/vsftpd',
-               port        => 'ftp',
+               service     => 'ftp',
                server_args => $fname,
                ferm        => false,
                instances   => $max_clients,
                require     => File[$fname]
        }
 
+       Service['vsftpd']->Service['xinetd']
 }