[PATCH] add rsyncd to torrent1

Matt Domsch Matt_Domsch at dell.com
Fri Jun 5 03:35:29 UTC 2009


This creates an rsync module [torrents] on torrent1 so that people may
download the torrent files (only) to set up their seeds.  Saves a lot
of wgets.

Looking for +1s.


>From 59dcb2df5e27d2235b97be37589fb7f1d01031f7 Mon Sep 17 00:00:00 2001
From: Matt Domsch <mdomsch at puppet1.fedora.phx.redhat.com>
Date: Fri, 5 Jun 2009 03:31:37 +0000
Subject: [PATCH] add rsyncd for torrent1 torrents

---
 manifests/servergroups/torrent.pp        |    4 ++--
 manifests/services/torrent.pp            |    1 +
 modules/rsync/files/rsync.torrent1       |   14 ++++++++++++++
 modules/rsync/files/rsyncd.conf.torrent1 |   15 +++++++++++++++
 4 files changed, 32 insertions(+), 2 deletions(-)
 create mode 100644 modules/rsync/files/rsync.torrent1
 create mode 100644 modules/rsync/files/rsyncd.conf.torrent1

diff --git a/manifests/servergroups/torrent.pp b/manifests/servergroups/torrent.pp
index eb03f85..634ffc2 100644
--- a/manifests/servergroups/torrent.pp
+++ b/manifests/servergroups/torrent.pp
@@ -4,8 +4,8 @@ class torrent {
     include selinux-enforcing
     include torrent-app
 
-    # Allow DNS, Web traffic and Torrent traffic
-    $tcpPorts = [ 53, 80, 443, '6881:6999' ]
+    # Allow DNS, Web traffic, rsync, and Torrent traffic 
+    $tcpPorts = [ 53, 80, 443, 873, '6881:6999' ]
     $udpPorts = [ 53 ]
     #Second rule to allow NRPE/Nagios to monitor, third for zabbix
     $custom = [ '-A INPUT -p tcp -m tcp --dport 53 --tcp-flags SYN,RST,ACK SYN -j ACCEPT', '-A INPUT -p tcp -s 209.132.177.0/24 --dport 5666 -j ACCEPT', '-A INPUT -p tcp -s 209.132.177.0/24 --dport 10050 -j ACCEPT' ]
diff --git a/manifests/services/torrent.pp b/manifests/services/torrent.pp
index c847561..327deec 100644
--- a/manifests/services/torrent.pp
+++ b/manifests/services/torrent.pp
@@ -16,6 +16,7 @@ class torrent-app {
     }
     service { httpd:
     }
+    include rsync::rsyncd
 
     apachefile { "/etc/httpd/conf.d/torrent.conf":
         source => "torrent/torrent.conf"
diff --git a/modules/rsync/files/rsync.torrent1 b/modules/rsync/files/rsync.torrent1
new file mode 100644
index 0000000..f02e097
--- /dev/null
+++ b/modules/rsync/files/rsync.torrent1
@@ -0,0 +1,14 @@
+# default: off
+# description: The rsync server is a good addition to an ftp server, as it \
+#       allows crc checksumming etc.
+service rsync
+{
+        disable         = no
+        socket_type     = stream
+        wait            = no
+        user            = root
+        server          = /usr/bin/rsync
+        server_args     = --daemon
+        log_on_failure  += USERID
+}
+
diff --git a/modules/rsync/files/rsyncd.conf.torrent1 b/modules/rsync/files/rsyncd.conf.torrent1
new file mode 100644
index 0000000..3a6392f
--- /dev/null
+++ b/modules/rsync/files/rsyncd.conf.torrent1
@@ -0,0 +1,15 @@
+pid file = /var/run/rsyncd.pid
+syslog facility = daemon
+dont compress = *.gz *.tgz *.zip *.z *.rpm *.deb *.bz2 *.iso *.ogg *.ogv *.torrent
+use chroot = false
+transfer logging = false
+timeout = 600
+
+[torrents]
+path = /srv/torrents/btholding
+comment = Fedora, Spins, and other hosted torrents
+uid = nobody
+gid = nobody
+read only = yes
+include = *.torrent
+exclude = *
-- 
1.5.5.6


-- 
Matt Domsch
Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux




More information about the Fedora-infrastructure-list mailing list