Send a link

eur0pre

Table of contents



Step 1: Preparing executable dependencies

#!/bin/sh

bins="sed echo touch chmod pwd grep basename date mv bash dupediradd find du expr"

for foo in $bins; do
        found=`which $foo`
        echo $found
        cp $found /glftpd/bin/
done


Step 2: Preparing file system permissions

chmod 666 /etc/glftpd.conf
chmod 666 /glftpd/ftp-data/logs/dupelog
chmod 666 /glftpd/dev/null


Step 3: Install pre scripts

(and make sure paths are correct inside some of them)
cp addaffil.sh delaffil.sh getmp3preinfo.sh getmvpreinfo.sh listaffils.sh pre.sh /glftpd/bin/
vi addaffil.sh
vi delaffil.sh
vi pre.sh


Step 4: Move configuration inside chroot

(so we can change groups from custom scripts later)
cd /etc
chmod 666 glftpd.conf
mv glftpd.conf /glftpd/etc/
ln -s /glftpd/etc/glftpd.conf glftpd.conf


Step 5: Prepare configuration

vi /etc/glftpd.conf
privgroup STAFFPRE Staff[:space:]Viewable[:space:]Pres
dirlog           /site/PRE/*     !*
makedir          /site/PRE/*/*   *
rename           /site/PRE/*/*   *
resume           /site/PRE/*     *
nuke             /site/PRE/*     !*
delete           /site/PRE/*/*   *
hideinwho        /site/PRE*      !1 *
creditloss 0 yes /site/PRE/*/*   *
nodupecheck      /site/PRE/*
site_cmd ADDAFFIL       EXEC            /bin/addaffil.sh
site_cmd DELAFFIL       EXEC            /bin/delaffil.sh
site_cmd LISTAFFILS     EXEC            /bin/listaffils.sh
site_cmd PRE            EXEC            /bin/pre.sh
custom-addaffil         1
custom-delaffil         1
custom-listaffils       !8 *
custom-pre              !8 *


Step 6: Edit bot config

vi dZSbot.vars
set variables(PRE) "%pf %user %group %file_size %size %junk"


Step 7: Edit bot theme

vi themes/classic.zst
announce.PRE = "%b{[%c1{%section-PRE}]} + %b{%group} launches %b{%relname} - (with %b{%size}MB in %b{%file_size}F)"


Step 8: Test log entries

echo into glftpd.log
PRE: "/site/SECTION/test" "USER" "GROUP" "FILES" "SIZE" "SECTION"


Step 9: Install extra tools if needed

(I don't recall doing this, but something might be bundled with the package)
tar zxf *.tar.gz
make
make install


  • + : A leading plus sign indicates that this word must be present in every object returned.
  • - : A leading minus sign indicates that this word must not be present in any row returned.
  • By default (when neither plus nor minus is specified) the word is optional, but the object that contain it will be rated higher.
  • < > : These two operators are used to change a word's contribution to the relevance value that is assigned to a row.
  • ( ) : Parentheses are used to group words into subexpressions.
  • ~ : A leading tilde acts as a negation operator, causing the word's contribution to the object relevance to be negative. It's useful for marking noise words. An object that contains such a word will be rated lower than others, but will not be excluded altogether, as it would be with the - operator.
  • * : An asterisk is the truncation operator. Unlike the other operators, it should be appended to the word, not prepended.
  • " : The phrase, that is enclosed in double quotes ", matches only objects that contain this phrase literally, as it was typed.

Menu