aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormcrane <mctch@yahoo.com>2009-08-01 04:58:18 -0600
committermcrane <mctch@yahoo.com>2009-08-01 04:58:18 -0600
commitd8e5677bab893603613adefb6f839f19550a64a3 (patch)
tree7b0e9fdb3cacedd46db608b79999611dee584f02
parente0660de17552d5a859b6215d1b8fa3132119bc8c (diff)
downloadpfsense-packages-d8e5677bab893603613adefb6f839f19550a64a3.tar.gz
pfsense-packages-d8e5677bab893603613adefb6f839f19550a64a3.tar.bz2
pfsense-packages-d8e5677bab893603613adefb6f839f19550a64a3.zip
DenyHosts change startup script
-rw-r--r--config/denyhosts/denyhosts.inc50
-rw-r--r--config/denyhosts/denyhosts.xml8
-rwxr-xr-xpkg_config.7.xml4
3 files changed, 34 insertions, 28 deletions
diff --git a/config/denyhosts/denyhosts.inc b/config/denyhosts/denyhosts.inc
index 1efb250a..4d4188b2 100644
--- a/config/denyhosts/denyhosts.inc
+++ b/config/denyhosts/denyhosts.inc
@@ -99,24 +99,25 @@ function php_install_command()
unlink_if_exists("/tmp/denyhosts_log.tmp");
- $denyhosts_sh = "\n";
- $denyhosts_sh .= "name=\"denyhosts\"\n";
- $denyhosts_sh .= "rcvar=\${name}_enable\n";
- $denyhosts_sh .= "\n";
- $denyhosts_sh .= "command=\"/usr/local/bin/denyhosts.py\"\n";
- $denyhosts_sh .= "command_interpreter=\"/usr/local/bin/python2.5\"\n";
- $denyhosts_sh .= "command_args=\"--config /usr/local/etc/denyhosts.conf --daemon\"\n";
- $denyhosts_sh .= "pidfile=\"/var/run/\${name}.pid\"\n";
- $denyhosts_sh .= "\n";
- $denyhosts_sh .= "load_rc_config \$name\n";
- $denyhosts_sh .= "\n";
- $denyhosts_sh .= ": \${denyhosts_enable=\"YES\"}\n";
- $denyhosts_sh .= "\n";
- $denyhosts_sh .= "run_rc_command \"\$1\"\n";
- $fout = fopen("/usr/local/etc/rc.d/denyhosts.sh","w");
- fwrite($fout, $denyhosts_sh);
- unset($denyhosts_sh);
- fclose($fout);
+ //$denyhosts_sh = "\n";
+ //$denyhosts_sh .= "name=\"denyhosts\"\n";
+ //$denyhosts_sh .= "rcvar=\${name}_enable\n";
+ //$denyhosts_sh .= "\n";
+ //$denyhosts_sh .= "command=\"/usr/local/bin/denyhosts.py\"\n";
+ //$denyhosts_sh .= "command_interpreter=\"/usr/local/bin/python2.5\"\n";
+ //$denyhosts_sh .= "command_args=\"--config /usr/local/etc/denyhosts.conf --daemon\"\n";
+ //$denyhosts_sh .= "pidfile=\"/var/run/\${name}.pid\"\n";
+ //$denyhosts_sh .= "\n";
+ //$denyhosts_sh .= "load_rc_config \$name\n";
+ //$denyhosts_sh .= "\n";
+ //$denyhosts_sh .= ": \${denyhosts_enable=\"YES\"}\n";
+ //$denyhosts_sh .= "\n";
+ //$denyhosts_sh .= "run_rc_command \"\$1\"\n";
+ //$fout = fopen("/usr/local/etc/rc.d/denyhosts.sh","w");
+ //fwrite($fout, $denyhosts_sh);
+ //unset($denyhosts_sh);
+ //fclose($fout);
+ //exec("chmod 755 /usr/local/etc/rc.d/denyhosts.sh");
$filename = "/usr/local/etc/denyhosts.conf";
@@ -140,13 +141,12 @@ function php_install_command()
fclose($fout);
- //Error reading file: denyhosts.cfg
- //write_rcfile(array(
- // "file" => "denyhosts.sh",
- // "start" => "start command",
- // "stop" => "rm /var/run/nameofservice.pid"
- // )
- //);
+ write_rcfile(array(
+ "file" => "denyhosts.sh",
+ "start" => "/usr/local/bin/python2.5 /usr/local/bin/denyhosts.py --config /usr/local/etc/denyhosts.conf --daemon",
+ "stop" => "rm /var/run/denyhosts.pid"
+ )
+ );
php_sync_package();
diff --git a/config/denyhosts/denyhosts.xml b/config/denyhosts/denyhosts.xml
index 5a09be94..72a239c5 100644
--- a/config/denyhosts/denyhosts.xml
+++ b/config/denyhosts/denyhosts.xml
@@ -41,7 +41,7 @@
<requirements>Describe your package requirements here</requirements>
<faq>Currently there are no FAQ items provided.</faq>
<name>DenyHosts</name>
- <version>0.2</version>
+ <version>0.3</version>
<title>Settings</title>
<include_file>/usr/local/pkg/denyhosts.inc</include_file>
<menu>
@@ -51,6 +51,12 @@
<configfile>denyhosts.xml</configfile>
<url>/packages/denyhosts/denyhosts_log.php</url>
</menu>
+ <service>
+ <name>denyhosts</name>
+ <rcfile>denyhosts.sh</rcfile>
+ <executable>denyhosts</executable>
+ <description>DenyHosts analyzes logs for SSH login attempts and blocks offending IP addresses.</description>
+ </service>
<tabs>
<tab>
<text>Settings</text>
diff --git a/pkg_config.7.xml b/pkg_config.7.xml
index eec96a1a..fd0993ed 100755
--- a/pkg_config.7.xml
+++ b/pkg_config.7.xml
@@ -219,12 +219,12 @@
<package>
<name>DenyHosts</name>
<website/>
- <descr>The DenyHosts utility is used to manage protect SSH.</descr>
+ <descr>DenyHosts analyzes logs for SSH login attempts and blocks offending IP addresses.</descr>
<category>Services</category>
<pkginfolink></pkginfolink>
<config_file>http://www.pfsense.com/packages/config/denyhosts/denyhosts.xml</config_file>
<depends_on_package_base_url>http://files.pfsense.org/packages/7/All/</depends_on_package_base_url>
- <version>0.2</version>
+ <version>0.3</version>
<status>Beta</status>
<required_version>1.2.3</required_version>
<maintainer>markjcrane@gmail.com</maintainer>