Selaa lähdekoodia

add Apache config snippet and use --logfile on the tracker

Ralf S. Engelschall 21 vuotta sitten
vanhempi
commit
e376f1ca70
3 muutettua tiedostoa jossa 14 lisäystä ja 3 poistoa
  1. 6 0
      bittorrent/apache.conf
  2. 6 1
      bittorrent/bittorrent.spec
  3. 2 2
      bittorrent/rc.bittorrent

+ 6 - 0
bittorrent/apache.conf

@@ -0,0 +1,6 @@
+##
+##  apache.conf -- BitTorrent MIME-Type Addition for Apache HTTP Server
+##
+
+AddType application/x-bittorrent .torrent
+

+ 6 - 1
bittorrent/bittorrent.spec

@@ -34,11 +34,12 @@ Class:        EVAL
 Group:        Network
 License:      MIT-style
 Version:      3.4.2
-Release:      20040518
+Release:      20040519
 
 #   list of sources
 Source0:      http://osdn.dl.sourceforge.net/bittorrent/BitTorrent-%{version}.tar.gz
 Source1:      rc.bittorrent
+Source2:      apache.conf
 
 #   build information
 Prefix:       %{l_prefix}
@@ -84,6 +85,10 @@ AutoReqProv:  no
           chmod a+x $RPM_BUILD_ROOT%{l_prefix}/bin/$dst
       done
     ) || exit $?
+    %{l_shtool} mkdir -f -p -m 755 \
+        $RPM_BUILD_ROOT%{l_prefix}/etc/bittorrent
+    %{l_shtool} install -c -m 755 %{l_value -s -a} \
+        %{SOURCE apache.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/bittorrent/
     %{l_shtool} mkdir -f -p -m 755 \
         $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
     %{l_shtool} install -c -m 755 %{l_value -s -a} \

+ 2 - 2
bittorrent/rc.bittorrent

@@ -34,8 +34,8 @@
     ( nohup @l_prefix@/bin/bttrack \
           --port $bittorrent_port \
           --dfile $bittorrent_datafile \
-          >>$bittorrent_logfile \
-          </dev/null 2>/dev/null &
+          --logfile $bittorrent_logfile \
+          </dev/null >/dev/null 2>&1 &
       echo $! >$bittorrent_pidfile
     ) >/dev/null 2>&1