diff options
author | mcrane <mctch@yahoo.com> | 2009-09-20 00:48:41 -0600 |
---|---|---|
committer | mcrane <mctch@yahoo.com> | 2009-09-20 00:48:41 -0600 |
commit | 9574ebd9a99b58cf339d471c293ce1e4d63494ce (patch) | |
tree | 6e38e3e20fc78ee5b0b130a3e425c0ec95ddee2e /config | |
parent | 7c9fd45678347b2f39ab3240561cf67f95d9c4c5 (diff) | |
download | pfsense-packages-9574ebd9a99b58cf339d471c293ce1e4d63494ce.tar.gz pfsense-packages-9574ebd9a99b58cf339d471c293ce1e4d63494ce.tar.bz2 pfsense-packages-9574ebd9a99b58cf339d471c293ce1e4d63494ce.zip |
Denyhosts package change the package download location to files.pfsense.com to fix the package.
Diffstat (limited to 'config')
-rw-r--r-- | config/denyhosts/denyhosts.inc | 36 | ||||
-rw-r--r-- | config/denyhosts/denyhosts.xml | 2 |
2 files changed, 16 insertions, 22 deletions
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 @@ <requirements>Describe your package requirements here</requirements> <faq>Currently there are no FAQ items provided.</faq> <name>DenyHosts</name> - <version>0.5</version> + <version>0.5.1</version> <title>Settings</title> <include_file>/usr/local/pkg/denyhosts.inc</include_file> <menu> |