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-25-2005, 03:39 AM   #1

Country:
Posts: n/a
Default Peerguardin Daemon/Gui Installations & Update Script

Hello,

I have little customize this Script it Installs the daemon/gui, and I have apply a update Script.
For the Linux Newbee´s a very easy way to install and to start it ;)

Welcome to PeerGuardian Linux Installer - vesion 1.5 beta
A Methlabs Production - http://www.methlabs.org
By Bitrot, Nullcontext. Installer by JFM
Original PeerGuardian by Method, PG2 by Phrosty


You need Gmabas to run the Gui
http://gambas.sourceforge.net/

Download the Package.
http://3dlinuxforen.de/downloads/peerguardin.tar

After Extract run the Install.sh
sh install.sh

The /usr/bin/peer.sh Script dwonloads the new Blocklist from blocklist.org,
starts the damoen and runs the Gui.
When you close the Gui the daemon will be killed.

Code:
#binbash
cd /etc
rm p2p.p2b.p2p
rm p2p.p2b.gz
rm p2p.p2b
wget -c blocklist.org/p2p.p2b.gz
gunzip p2p.p2b.gz
peerguardnf -n p2p.p2b
killall peerguardnf
peerguardnf -d -c /etc/PG.conf -l /var/log/PG.log -h -m
cd /usr/bin/peerguardnf2
./peerguardnf2
killall peerguardnf
exit
MFG SmOkyS
  Reply With Quote

 
Old 04-26-2005, 01:20 AM   #2
NULLContext

Developer
Join Date: Aug 2004
Country:
Posts: 174
Default

/me blinks a couple times

what happened to your slashes?

And a little bitta bang to the bash. Oh well, whatever makes it easy. ^_^
NULLContext is offline   Reply With Quote

 
Old 04-26-2005, 01:45 AM   #3
JFM
 
JFM's Avatar

Public Relations
Join Date: Sep 2005
Location: Aberdeen, UK
Country: United Kingdom
Posts: 2,483
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

ooh... thats a good way of doing it :)

the problem is that you need to be root to run it, so its not great for normal users :(
could be used as a startup script though (without the GUI)
__________________
Joseph Farthing
Public Relations
JFM is offline   Reply With Quote

 
Old 04-27-2005, 10:49 AM   #4
JFM
 
JFM's Avatar

Public Relations
Join Date: Sep 2005
Location: Aberdeen, UK
Country: United Kingdom
Posts: 2,483
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

modified these scripts slightly and made several versions, maybe for use in the app?

start up
Quote:
#/bin/sh
cd /etc
rm p2p.p2b.p2p
rm p2p.p2b.gz
rm p2p.p2b
wget -c blocklist.org/p2p.p2b.gz
gunzip p2p.p2b.gz
peerguardnf -n p2p.p2b
peerguardnf -d -c /etc/PG.conf -l /var/log/PG.log -h -m
shut down
Quote:
#/bin/sh
killall peerguardnf
update
Quote:
#/bin/sh
cd /etc
rm p2p.p2b.p2p
rm p2p.p2b.gz
rm p2p.p2b
wget -c blocklist.org/p2p.p2b.gz
gunzip p2p.p2b.gz
peerguardnf -n p2p.p2b
killall peerguardnf
peerguardnf -d -c /etc/PG.conf -l /var/log/PG.log -h -m
and a special one:

before you run this you need to do:

cd /etc
mkdir ./custom_blocklists

download and merge multiple lists
Quote:
#/bin/sh
cd /etc
rm *.p2*

cd ./custom_blocklists

rm *.p2*

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

cd ..

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
__________________
Joseph Farthing
Public Relations
JFM is offline   Reply With Quote

 
Old 04-27-2005, 11:25 AM   #5

Country:
Posts: n/a
Default

Hello,

the last script would be nice ;)
but i became an error

Code:
Reading blocklist
wrong input blocklist format
Appending ./custom_blocklists/*.gz.p2p
  Reply With Quote

 
Old 04-27-2005, 11:30 AM   #6
JFM
 
JFM's Avatar

Public Relations
Join Date: Sep 2005
Location: Aberdeen, UK
Country: United Kingdom
Posts: 2,483
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

oops i just spotted it i'll fix it
__________________
Joseph Farthing
Public Relations
JFM is offline   Reply With Quote

 
Old 04-27-2005, 10:46 PM   #7
NULLContext

Developer
Join Date: Aug 2004
Country:
Posts: 174
Default

Quote:
Originally Posted by SmOkyS

but i became an error
:eek:

<sorry couldn't resist that one>
NULLContext is offline   Reply With Quote

 
Old 04-27-2005, 11:23 PM   #8
stedios
 
stedios's Avatar

Official Bug Magnet
Join Date: Sep 2005
Posts: 2,743
Donor
Default

haha, thats classic
__________________
If at first they don't succed, block em again :) PG2

Vinnys Pizza

stedios is offline   Reply With Quote

 
Old 04-28-2005, 01:47 AM   #9
NULLContext

Developer
Join Date: Aug 2004
Country:
Posts: 174
Default

I was just thinking currently it's written:
rm p2p.p2b.p2p
rm p2p.p2b.gz
rm p2p.p2b

Wouldn't this work?

for file in *
do
p2pbegin=`echo $file |cut -f1 -d.`
if [[ "$p2pbegin" == "p2p" ]]
then
rm $file
fi
done

I'll shutup now I'm a script newb and that would get rid of everything with p2p in the first part of the name.

hmm
#/bin/bash
cd /etc

# removing old blocklists
for file in *
do
p2pbegin=`echo $file |cut -f1 -d.`
if [[ "$p2pbegin" == "p2p" ]]
then
echo removing $file
rm $file
fi
done
# get the blocklist
echo getting new blocklist
wget -c blocklist.org/p2p.p2b.gz

#unzip and start blocking
echo unziping blocklist
gunzip p2p.p2b.gz

echo starting peerguardian linux
peerguardnf -n p2p.p2b
killall peerguardnf
peerguardnf -d -c /etc/PG.conf -l /var/log/PG.log -h -m

# start the UI
echo starting peerguardian ui
cd /usr/bin/peerguardnf2
./peerguardnf2

echo shutting down daemon
killall peerguardnf
echo script done
exit

nuff for now same could be done to JFM's scripts.
NULLContext is offline   Reply With Quote

 
Old 04-28-2005, 07:07 AM   #10

Country:
Posts: n/a
Default

@JFM: In your multiple lists script, shouldn't there be all lists deleted or is it right to let it just delete p2p.p2b.gz, p2p.p2b.p2p and p2p.p2b?

It was just a thought, but wouldn't be

Code:
rm *.p2p
rm *.p2b.gz
rm *.p2b
better?

Greets, orihnja

edit:
or even
Code:
rm *.p2*
edit2: narf ... didn't see
Code:
for n in ./custom_blocklists/*.gz
do
rm $n
done

for n in ./custom_blocklists/*.p2b
do
rm $n
done


for n in ./custom_blocklists/*.p2p
do
rm $n
done
where was my mind? :P

but wouldn't
Code:
#/bin/sh
cd /etc
rm *.p2*
cd ./custom_blocklists
rm *
cd ..
be easier?
  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 36 04-15-2008 02:25 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 05:35 AM.


  

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