pyruse/doc/install.md

2.1 KiB

Installation

The software requirements are:

Besides, getting the software requires Git, and packaging it requires python-setuptools.

Get and run Pyruse

Getting the software is just a matter of cloning the repository with Git.

It can be run without being installed:

  1. Create a configuration file in the root directory of the repository (where doc, extra, pyruse, tests… reside).

  2. Run Pyruse like this at the root directory of the repository:

$ sudo python3 -c 'from pyruse import main; main.main()'

Run the tests

To run the tests, enter the tests subdirectory, and run python3 main.py there.

Install and run Pyruse

To install Pyruse on the system, run these commands as root, in the root directory of the repository:

# curl -o PKGBUILD 'https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pyruse'
# . PKGBUILD
# export srcdir="$PWD/.."
# export pkgdir=
# package
# rm -rf build PKGBUILD
# systemctl daemon-reload

The package line is the one that actually alters the system. Until Pyruse is packaged for your operating system, you may want to change this line to checkinstall package. Checkinstall should be able to turn your Pyruse installation into a native Linux package.

Then, to run Pyruse, start (and enable) pyruse.service.

If you use nftables bans, you should also start (and enable) pyruse-boot@action_nftBan.service. Likewise, if you use ipset bans, you should start (and enable) pyruse-boot@action_ipsetBan.service.