forked from glftpd/foo-tools
-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.foo-pre
209 lines (146 loc) · 6.57 KB
/
README.foo-pre
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
foo-pre v3.3 (c) Tanesha Team - Your pre-choice since 2000 ;-)
---------------------------------------------------------------
Tanesha Team <tanesha@tanesha.net>
table of contents;
------------------
0) table of contents, d'uh.
1) features
2) changelog
3) requirements
4) installation
5) getting announces
features;
---------
* Multiple predirs per group
* Multiple pre-destinations per group
* Giving credits and stats for right fileowners on pre-command
* Updates all gl .logs correctly (eg. dupelog, dirlog)
* Fully definable-announces per grp
* Allows to use predefined ratios for grps.
* Extendible with modules.
* Premade module for extracting mp3id for announce on pre.
* Premade module for adding site.nfo to release dirs on pre.
* Premade module for extracting information from the .nfo files on pre.
* Plus ofcause, it increases user's happyness-level :-)
changelog;
----------
Changed in version 3.3;
+ Finished implementing the module framework. Take at look at the
src/pre/README.modules for info.
+ Created a few modules: mod_idmp3, mod_nfohandler, mod_sitenfoadd,
look at the src/pre/modules/ dir for info on those.
+ Added 'force' parameter to pre args. This is to fight the 'late pre'.
It works like you do: 'site pre release-grp section force' and it
will rename the already uploaded catalog to release-grp_TRADING
and continue pre as usual. You can then nuke/wipe the _TRADING dir
as you like.
Changed in version 3.2;
+ Added move.external which can be used for doing move when you have
multiple partitions. NOTE: This will take time, and your uses will
bitch about slow pre, fix your disk-setup instead !
Changed in version 3.1;
+ Touching files on pre, all files/subdirs will have the time of pre now.
+ All 'group.' settings can now use DEFAULT. eg. group.DEFAULT.chown.user
+ Added macros for destination dir, for better support of daily dirs.
(you can use MM DD YY YYYY and WW in section.nnn.dir)
+ Added group.nnn.def_sec setting, to allow default pre section for
groups.
Changed in version 3.o;
* Almost 100% rewrite of the code, now much easier to extend in future.
* Config file also has new layout, so be sure to take look at it.
- Removed the 'late pre' feature, since it wasnt very beautiful and too
dependent on how the zipscript works.
+ Added support for glftpd's sections.
+ New macros for announce: %G %g %T.
+ Added support for chowning of the files in a pre (to hide who
put the files).
+ Added support for a default announce style.
+ Added logging to /ftp-data/logs/foo-pre.log
+ Added support for defining which files should be counted in announce
and given credits for.
Changed in version 2.3;
* Fixed broken touching of dirs.
+ Added support for preing to linked dirs (and getting real dir added to dirlog).
(eg, pre to /site/today would expand to /site/incoming/0917)
+ Added support for better counting of files for irc announces.
+ Added support for not giving stats to pre-wh0re.
+ Implemented %P macro, points to destination-section's dir.
+ Using new passwd file parsing, so should now run on fbsd-glftpd too.
Changed in version 2.1;
+ Added "touching" of the dir, so it shows up last on "ls -ltr".
+ Added support for non-shell zipscripts in 'late pre' racing, read
the docs on what this means.
Changed in version 2.o;
* Fixed that sometimes it created weird files in /ftp-data/users.
+ Added support to specify ratios (if you add bytes when users uploads).
+ Added support not to add dirlog.
* Fixed dirlog updates for main-dir of a release. Now is summed up
correctly.
* Rewrote late pre functionality. Now moves files much faster to
destination dir, and checks afterwards.
* Fixed that an empty main-dir of a release wouldnt be added to dirlog.
+ Implemented the %C macro.
requirements;
-------------
None. Although we recommend that you have configured your glftpd so that
predir and destination dir are on the same partition, so we can use
rename() instead of external move command.
installation;
-------------
* Build the binary if you didnt already.
"make"
* Copy foo-pre to your glftpd bin dir, and .conf to ftp-data/misc.
"cp foo-pre /glftpd/bin/; cp pre.cfg /glftpd/etc/"
* Set correct permissions on foo-pre, it needs setuid bit set.
"chown root /glftpd/bin/foo-pre; chmod 4711 /glftpd/bin/foo-pre"
* Add foo-pre in your glftpd.conf.
"site_cmd PRE EXEC /bin/foo-pre"
"custom-pre *"
* Edit /glftpd/etc/pre.cfg to reflect your setup.
Look at the sample .cfg for details.
* Change your glftpd.conf to not modify stats/credits for uploading into
grpdirs. foo-pre will add credits/stats to the users in the
selected sections when the release is pred.
"creditcheck /site/private* 0"
"nostats /site/private/* *"
* Copy display files to be in place.
"cp pre-head.txt pre-tail.txt /glftpd/ftp-data/misc"
* OPTIONAL:
If you want to use modules, you go into the src/pre/modules/ dir
and run 'make' to build the modules, or read the README.* for
info on how to build the modules.
Thats it, now hopefully you can login and run 'site pre' and go
get someone to use the tool :-)
getting announces;
------------------
your bot's .tcl is outside the scope of foo-pre. It pres the release
and does other things, but it does not make sure that your pre gets
announced on IRC through your arbitrary complex botnet.
However, here is an idea for how you can add the PRE log-target to your
.tcl if it looks like the old 'vr' style .tcl.
The following expects you to use the standard PRE logtarget:
PRE: "%R" "%G" "%D" "%P" "%PP" %F %S %C "%W" "%U" "%g" "%T"
It will produce logentries that looks like this:
PRE: "Some.Release.v1.0.WinX-GRP" "GRP" "0day" "/site/today" "/site/incoming/05-28" 3 11.2 1 "someone/1.0, someother/10.2" "someone" "MyGroup" "I love foopre"
First find the scanlog proc and locate where in the case switch to
add the PRE: target.
PRE: {
set release [lindex $args 0]
set group [lindex $args 1]
set section [lindex $args 2]
set secpath [lindex $args 3]
set prepath [lindex $args 4]
set files [lindex $args 5]
set mbytes [lindex $args 6]
set cds [lindex $args 7]
set whores [lindex $args 8]
set uname [lindex $args 9]
set ugroup [lindex $args 10]
set utagline [lindex $args 11]
sndall "\[MySite\] $group-PRE. $uname/$ugroup released $release into $section. Its $files files / $mbytes Mb. Whores are: $whores .. Now GO GO GO"
}
last note;
----------
As mentioned by PCFiL in HOWTO :
when you do 'site pre' and you have : "200 Command Successful."
do : mknod /glftpd/dev/full c 1 7