Revize 901
Přidáno uživatelem Roman Ševčík před více než 13 roky(ů)
freenetis/branches/redirection/application/vendors/redirection/freenetis.cfg | ||
---|---|---|
# auhtor Sevcik Roman 2011 #
|
||
# email sevcik.roman@slfree.net #
|
||
# #
|
||
# name frnts_synchronization.sh #
|
||
# name freenetis.cfg #
|
||
# version 1.9 #
|
||
# #
|
||
##################################################################################
|
freenetis/branches/redirection/application/vendors/redirection/freenetis | ||
---|---|---|
|
||
##################################################################################
|
||
# #
|
||
# This script serves for redirection ip policy of IS FreeNetIS #
|
||
# This script serves for redirection ip policy of IS FreeNetIS #
|
||
# #
|
||
# auhtor Sevcik Roman 2011 #
|
||
# email sevcik.roman@slfree.net #
|
||
# #
|
||
# name frnts_synchronization.sh #
|
||
# version 1.9 #
|
||
# #
|
||
# name freenetis #
|
||
# version 1.9 #
|
||
# #
|
||
##################################################################################
|
||
|
||
#Local variable contains path to iptables - mandatory
|
||
... | ... | |
return 1
|
||
fi
|
||
|
||
|
||
echo "Adding sets.";
|
||
|
||
ipset -N whitelist iphash --hashsize 10000 --probes 4 --resize 50
|
||
... | ... | |
|
||
#Killing of process by sigterm
|
||
echo "Killing process."
|
||
cat $PIDFILE | xargs kill
|
||
killall -q freenetis_synchronization.sh
|
||
|
||
#Delete pid file
|
||
rm -f $PIDFILE
|
freenetis/branches/redirection/application/vendors/redirection/README | ||
---|---|---|
/etc/init.d/freenetis start|stop|restart
|
||
|
||
System does not need cron, after starting system, freenetis_synchronization.sh
|
||
runs in infinite loop.
|
||
runs in infinite loop. If you need to change delay between next cycle just edit variable DELAY in freenetis.cfg
|
freenetis/branches/redirection/application/vendors/redirection/freenetis_synchronization.sh | ||
---|---|---|
# auhtor Sevcik Roman 2011 #
|
||
# email sevcik.roman@slfree.net #
|
||
# #
|
||
# name frnts_synchronization.sh #
|
||
# name freenetis_synchronization.sh #
|
||
# version 1.9 #
|
||
# #
|
||
##################################################################################
|
||
... | ... | |
export IFS=";"
|
||
|
||
echo "Sending seen set data...";
|
||
wget -q -O /tmp/out.txt $SET_URL_SEEN --no-check-certificate --post-data "seen=${seen[*]}"
|
||
wget -q -O /dev/null $SET_URL_SEEN --no-check-certificate --post-data "seen=${seen[*]}"
|
||
|
||
IFS=$OIFS
|
||
|
Také k dispozici: Unified diff
Malé úpravy.