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"
(I don't recall doing this, but something might be bundled with the package)
tar zxf *.tar.gz
make
make install