PHP Classes

File: init.d/gentoo-hostblock.sh

Recommend this page to a friend!
  Classes of Rolands Kusins   PHP Block Host   init.d/gentoo-hostblock.sh   Download  
File: init.d/gentoo-hostblock.sh
Role: Auxiliary data
Content type: text/plain
Description: Init.d script for Gentoo
Class: PHP Block Host
Parse logs and block suspicious hosts
Author: By
Last change:
Date: 10 years ago
Size: 806 bytes
 

Contents

Class file image Download
#!/sbin/runscript extra_commands="stats list dlist" description="HostBlock analyzes log files and updates access files to deny access" description_stats="Shows statistics about blacklisted IPs" description_list="Lists all blacklisted IPs" description_dlist="Detailed list with all blacklisted IPs (includes count and last activity)" depend() { use logger } start() { ebegin "Starting HostBlock daemon" start-stop-daemon --start -exec /usr/bin/hostblock --pidfile /var/run/hostblock.pid -- --daemon eend $? } stop() { ebegin "Stopping HostBlock daemon" start-stop-daemon --stop --pidfile /var/run/hostblock.pid eend $? } stats() { /usr/bin/hostblock --statistics } list() { /usr/bin/hostblock --list } dlist() { /usr/bin/hostblock --list --time --count }