From 9574ebd9a99b58cf339d471c293ce1e4d63494ce Mon Sep 17 00:00:00 2001 From: mcrane Date: Sun, 20 Sep 2009 00:48:41 -0600 Subject: Denyhosts package change the package download location to files.pfsense.com to fix the package. --- config/denyhosts/denyhosts.inc | 36 +++++++++++++++--------------------- config/denyhosts/denyhosts.xml | 2 +- 2 files changed, 16 insertions(+), 22 deletions(-) (limited to 'config') diff --git a/config/denyhosts/denyhosts.inc b/config/denyhosts/denyhosts.inc index e19365de..51124f62 100644 --- a/config/denyhosts/denyhosts.inc +++ b/config/denyhosts/denyhosts.inc @@ -60,8 +60,8 @@ function php_install_command() exec("mkdir /usr/local/www/packages/denyhosts/"); } - exec("pkg_add -r denyhosts"); - + exec("pkg_add -r http://files.pfsense.com/packages/security/denyhosts-2.5.tbz"); + //misc files if (!is_dir('/usr/local/www/edit_area/')) { chdir('/tmp/'); @@ -73,7 +73,7 @@ function php_install_command() //backup the original hosts.allow file exec ("cp /etc/hosts.allow /etc/hosts.allow.bak"); - + $hosts_allow = "#\n"; $hosts_allow .= "# hosts.allow access control file for \"tcp wrapped\" applications.\n"; $hosts_allow .= "#\n"; @@ -84,24 +84,24 @@ function php_install_command() fwrite($fout, $hosts_allow); unset($hosts_allow); fclose($fout); - + if(!is_file("/etc/hosts.deniedssh")) { exec("touch /etc/hosts.deniedssh"); exec("chmod 755 /etc/hosts.deniedssh"); } - + if(!is_file("/var/log/denyhosts")) { exec ('touch /var/log/denyhosts'); } - + $download_path = 'http://www.pfsense.com/packages/config/denyhosts/'; - + //rename PHP files from .tmp to .php chdir('/tmp/'); exec("cd /tmp/;fetch ".$download_path."denyhosts_log.tmp"); exec("cp /tmp/denyhosts_log.tmp /usr/local/www/packages/denyhosts/denyhosts_log.php"); unlink_if_exists("/tmp/denyhosts_log.tmp"); - + //$denyhosts_sh = "\n"; //$denyhosts_sh .= "name=\"denyhosts\"\n"; @@ -122,8 +122,7 @@ function php_install_command() //unset($denyhosts_sh); //fclose($fout); //exec("chmod 755 /usr/local/etc/rc.d/denyhosts.sh"); - - + $filename = "/usr/local/etc/denyhosts.conf"; $handle = fopen($filename,"rb"); $denyhosts_conf = fread($handle, filesize($filename)); @@ -135,31 +134,26 @@ function php_install_command() fwrite($fout, $denyhosts_conf); unset($filename); fclose($fout); - - + $filename = "/usr/local/etc/denyhosts.conf-dist"; $fout = fopen($filename,"w"); fwrite($fout, $denyhosts_conf); unset($filename); unset($denyhosts_conf); fclose($fout); - - + 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(); - - + //start denyhosts exec("/usr/local/etc/rc.d/denyhosts.sh start"); - - + //if (pkg_is_service_running('notes')) { //documentation purposes //} @@ -197,7 +191,7 @@ function deinstall_command() //fwrite($fout, $tmp); //unset($tmp); //fclose($fout); - + conf_mount_ro(); config_unlock(); } diff --git a/config/denyhosts/denyhosts.xml b/config/denyhosts/denyhosts.xml index a3f28bc5..9562a9d6 100644 --- a/config/denyhosts/denyhosts.xml +++ b/config/denyhosts/denyhosts.xml @@ -41,7 +41,7 @@ Describe your package requirements here Currently there are no FAQ items provided. DenyHosts - 0.5 + 0.5.1 Settings /usr/local/pkg/denyhosts.inc -- cgit v1.2.3