Go Back   Phoenix Labs > Projects > PeerGuardian Linux
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes

 
Old 04-28-2005, 07:36 AM   #11
JFM
 
JFM's Avatar

Public Relations
Join Date: Sep 2005
Location: Kent, UK
Country: United Kingdom
Posts: 2,501
Send a message via ICQ to JFM Send a message via AIM to JFM Send a message via MSN to JFM Send a message via Yahoo to JFM
Send a message via Yahoo to JFM
Default

yep lol, that didn't come into my head

i'll change it now
__________________
Joseph Farthing
Public Relations
JFM is offline   Reply With Quote

 
Old 04-28-2005, 07:49 AM   #12

Country:
Posts: n/a
Default

wooohooo, looked so easy so i wasn't sure if it would work :D

edit: I have a problem:

Code:
--14:53:54--  http://blocklist.org/p2p.p2b.gz%0D
           => `p2p.p2b.gz%0D'
though the script says p2p.p2b.gz - what can i do to fix it?
  Reply With Quote

 
Old 04-28-2005, 08:14 AM   #13
JFM
 
JFM's Avatar

Public Relations
Join Date: Sep 2005
Location: Kent, UK
Country: United Kingdom
Posts: 2,501
Send a message via ICQ to JFM Send a message via AIM to JFM Send a message via MSN to JFM Send a message via Yahoo to JFM
Send a message via Yahoo to JFM
Default

hmm there must be a character there

try putting " " around the file name
__________________
Joseph Farthing
Public Relations
JFM is offline   Reply With Quote

 
Old 04-29-2005, 07:56 AM   #14

Country:
Posts: n/a
Default

found the problem: had to convert from dos2unix. now it works perfect!
  Reply With Quote

 
Old 04-30-2005, 09:03 AM   #15

Country:
Posts: n/a
Default

Updated your script for merging:

- added support for .txt-Lists including LISTS in PG-FORMAT! OTHER FORMATS NOT SUPPORTED!!
- readded the more secure way of deleting the lists in ./custom_blocklists


So here's the code:
Code:
 #/bin/sh
cd /etc
rm *.p2*

for n in ./custom_blocklists/*.*
do
echo Deleting $n
rm $n
done

cd ./custom_blocklists

wget -c blocklist.org/p2p.p2b.gz
wget -c blocklist.org/gov.p2b.gz
wget -c blocklist.org/spy.p2b.gz
wget -c blocklist.org/ads.p2b.gz
wget -c ANY .TXT FILE LINK INCLUDING PG-FORMATTED RULES!

cd ..

for n in ./custom_blocklists/*.txt
do
echo Converting $n
mv $n $n.p2p
done

for n in ./custom_blocklists/*.gz
do
echo Extracting $n
gunzip $n
done


for n in ./custom_blocklists/*.p2b
do
echo Converting $n
peerguardnf -n $n
done

for n in ./custom_blocklists/*.p2p
do
echo Appending $n
cat $n >> /etc/p2p.p2b.p2p
done

killall peerguardnf
peerguardnf -d -c /etc/PG.conf -l /var/log/PG.log -h -m
  Reply With Quote

 
Old 04-30-2005, 09:06 AM   #16
JFM
 
JFM's Avatar

Public Relations
Join Date: Sep 2005
Location: Kent, UK
Country: United Kingdom
Posts: 2,501
Send a message via ICQ to JFM Send a message via AIM to JFM Send a message via MSN to JFM Send a message via Yahoo to JFM
Send a message via Yahoo to JFM
Default

nice :)

looks fine to me, but do some testing
__________________
Joseph Farthing
Public Relations
JFM is offline   Reply With Quote

 
Old 04-30-2005, 09:30 AM   #17

Country:
Posts: n/a
Default

First testings show me that it seems to work. But i think it depends on the lists you're working with! they HAVE TO BE in PG-FORMAT like bluetacks.
  Reply With Quote

 
Old 05-30-2005, 04:59 PM   #18

Country:
Posts: n/a
Smile it runs on my Slackware...

Hi.
It's my experience with Peerguardian as daemon.
2 scripts are running on my workstation (Slackware-current).
I'm busy man, it was fast work.
First script updates lists of peers and it's located in /usr/bin (it runs under cron too):

pgupdate
#!/bin/sh
killall peerguardnf
cd /etc
rm p2p.p2b.p2p
rm p2p.p2b
rm ads.p2b.p2p
rm ads.p2b
rm edu.p2b.p2p
rm edu.p2b
rm gov.p2b.p2p
rm gov.p2b
rm spy.p2b.p2p
rm spy.p2b




wget -c blocklist.org/p2p.p2b.gz
gunzip p2p.p2b.gz
wget -c blocklist.org/ads.p2b.gz
gunzip ads.p2b.gz
wget -c blocklist.org/edu.p2b.gz
gunzip edu.p2b.gz
wget -c blocklist.org/gov.p2b.gz
gunzip gov.p2b.gz
wget -c blocklist.org/spy.p2b.gz
gunzip spy.p2b.gz


peerguardnf -n p2p.p2b
peerguardnf -n ads.p2b
peerguardnf -n edu.p2b
peerguardnf -n gov.p2b
peerguardnf -n spy.p2b

cat ads.p2b.p2p >> p2p.p2b.p2p
cat edu.p2b.p2p >> p2p.p2b.p2p
cat gov.p2b.p2p >> p2p.p2b.p2p
cat spy.p2b.p2p >> p2p.p2b.p2p


peerguardnf -d -c /etc/PG.conf -l /var/log/PG.log -h -m
Second exists into /etc/rc.d

rc.peerguardnf
#!/bin/sh
# Start/stop/restart peerguardian.

# Start peerguardnf:
peerguardnf_start() {
if [ -x /usr/bin/peerguardnf ]; then
echo "Starting peerguardian: /usr/bin/peerguardnf"
/usr/bin/pgupdate
echo "done."
fi
}

# Stop peerguardnf:
peerguardnf_stop() {
killall peerguardnf
}

# Restart peerguardnf:
peerguardnf_restart() {
peerguardnf_stop
sleep 1
peerguardnf_start
}

case "$1" in
'start')
peerguardnf_start
;;
'stop')
peerguardnf_stop
;;
'restart')
peerguardnf_restart
;;
*)
echo "usage $0 start|stop|restart"
esac
You must to start rc.peerguardnf when system starts - exampl. put into rc.M lines:
# If there are peerguardian init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.peerguardnf ]; then
. /etc/rc.d/rc.peerguardnf start
fi
I use it with the gambas GUI under KDE3.4. No problems.

PS. You must to be root on your system.

Regards from:
marekjs
  Reply With Quote

 
Old 06-06-2005, 03:53 AM   #19

Country:
Posts: n/a
Default

Nice Script runs on my maschine ver well ;)

Mandriva LE 2005
  Reply With Quote

 
Old 08-05-2005, 04:49 AM   #20

Country:
Posts: n/a
Default

this is an extract from my initscript, if it can't get a new blocklist it uses the one it already has.

d_start() {
cd /etc

if wget lists.blocklist.org/p2p.p2b.gz
then
echo "Extracting new blocklist."
if gunzip p2p.p2b.gz
then
echo "Renaming p2p.p2b to p2p.p2b.p2p."
mv p2p.p2b p2p.p2b.p2p
fi
else
echo "Using old blocklist."
fi

$DAEMON -d -c /etc/PG.conf -l /var/log/PG.log -m
}

but i'm always having trouble with stopping the daemon. when i'm connected through a remote shell and do a killall -9 peerguardnf my shell hangs most of the times and i even cannot open or use another one. i always have to reboot the server manually. what's the one and only way of stopping the daemon, there seem to be some things one has to keep in mind.
  Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MoBlock with init script and auto update on Fedora Quadduc PeerGuardian Linux 43 07-09-2009 09:54 PM
Linux PeerGuardian update script for bluetack.co.uk jre PeerGuardian Linux 31 01-28-2007 09:28 AM
Have been hacked for 4 weeks. Being_Hacked Misc. 19 09-14-2006 09:54 AM
Getting Gov. hits and dont know why ocean Technical Support 13 11-24-2005 04:16 AM


All times are GMT -5. The time now is 03:07 AM.


  

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© Phoenix Labs Staff