Update README.md

added systemd documentation
This commit is contained in:
CPJB 2015-11-02 16:44:16 +02:00
parent 9ff59f276c
commit f1be9dd897
1 changed files with 14 additions and 0 deletions

View File

@ -45,6 +45,20 @@ Once you have a config.json all you need to do is run `fail2rest --config config
However, fail2rest is designed to run as a service, so init scripts are provided that allow easy management of fail2rest. They can be found [here](https://github.com/Sean-Der/fail2rest/tree/master/init-scripts)
Download the appropriate init file your Distribution. You may need to customize your init script to load your config.json, but most scripts default to /etc/fail2rest.json
##Service
To run as a service you can either copy or create a symlink for the script file to /etc/systemd/system/fail2rest.service and for the binary to /usr/bin/fail2rest
ln -s $GOPATH/bin/fail2rest /usr/bin/
ln -s $GOPATH//src/github.com/Sean-Der/fail2rest/init-scripts/systemd /etc/systemd/system/fail2rest.service
Than you can run the systemd commands for starting
systemctl start fail2rest.service
Verify it is active and running
systemctl status fail2rest.service
##License
The MIT License (MIT)