GithubHelp home page GithubHelp logo

Comments (4)

tlhackque avatar tlhackque commented on June 9, 2024 1

You're right, that's a typo in the documentation that no one else noticed. The first word is always a command, never a switch.

Fixed now.

Permissions are also fixed in git and .tar.gz files. Of course, .zip doesn't store permissions, so anyone who downloads .zip files has to chmod manually.

from blockcountries.

tlhackque avatar tlhackque commented on June 9, 2024 1

In the next release, the case where BlockCountries attempts to read itself as a configuration file will be detected.

A suitable diagnostic message will be delivered.

The obsolete default configuration will also be removed, and BlockCountries will refuse to start unless a configuration is specified. You should never have a reason to edit the BlockCountries script.

The sample configuration file has been updated - it was never intended to recommend any particular set of countries. The old example is wrong for almost everyone.

BlockCountries will attempt to ensure that the sample configuration file has been reviewed and modified.

from blockcountries.

tlhackque avatar tlhackque commented on June 9, 2024

Nice to hear that BlockCountries has been helping you.

Thanks for bringing this to my attention.

That message is because you're executing the BlockCountries script from the release directory, but the script is not marked executable. The script is being processed as a configuration file. Change your working directory to someplace else or chmod +x the copy in the release directory, and it will work as expected.

The configuration file search path is listed by the help command, currently:
0. The the file specified by the environment variable BlockCountriesCFG

  1. ./BlockCountries
  2. ~/BlockCountries
  3. /etc/sysconfig/BlockCountries
  4. /etc/default/BlockCountries
  5. /etc/BlockCountries

This is so that the config file can be found on any UNIXish OS. Unfortunately, the convention is that the config file and the script have the same name.

To avoid most instances of this error, the search ignores any BlockCountries that is executable. But that doesn't work from the release directory due to a packaging error.

You need to be sure that the script itself is marked executable and that your config file is not. You should place your config file in the location that your distribution uses.

I'll change the packaging so that the script is marked executable in the .tar file.

from blockcountries.

eXcalibre avatar eXcalibre commented on June 9, 2024

Ok all good and thanks for the speedy reply tlhackque.

One thing to note from the info on the main git site page though, again not sure if its only my distro.

Run

BlockCountries -start -update
The filter should download the latest IP country assignments and be in place.

but you state BlockCountries -start -update.
the -start does not work, and needs the hyphen removing
i.e "BlockCountries start -update" instead.

thank you so much for a really really great little package. :) 👍

root@NS12:# /etc/init.d/BlockCountries -start -update
Usage: BlockCountries (start|stop|restart|condrestart|status|list|intercepts|config|help|version)
root@NS12:
# /etc/init.d/BlockCountries start -update
Starting blocked countries IP filter:
Updated IP zone data from lacnic
Updated IP zone data from ripe
Updated IP zone data from arin
Updated IP zone data from afrinic
Updated IP zone data from apnic [ OK ]
root@NS12:~#

from blockcountries.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.