Skip to content

Commit

Permalink
Merge branch 'master' of github.com:1tayH/noisy
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko committed Sep 7, 2018
2 parents 54c07eb + 26d2fa3 commit 14ee2f9
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,22 @@ $ cd examples/docker-compose
$ docker-compose build
$ docker-compose up --scale noisy=<number-of-containers>
```

## Set noisy to run automatically via systemd

You can use systemd to start noisy.py automatically on every boot. The provided
example service assumes that you have the script copied to /opt/noisy and that
noisy.py and config.json are readable by the 'noisy' user. You can change these
values to suit your needs.

To configure the service:
```
$ sudo cp examples/systemd/noisy.service /etc/systemd/system
$ sudo systemctl daemon-reload
$ sudo systemctl enable noisy && sudo systemctl start noisy
```

You can view the script's output by running:
```
$ journalctl -f -n noisy
```
10 changes: 10 additions & 0 deletions examples/systemd/noisy.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Simple random DNS, HTTP/S internet traffic noise generator

[Service]
User=noisy
WorkingDirectory=/opt/noisy
ExecStart=/usr/bin/python /opt/noisy/noisy.py --config /opt/noisy/config.json

[Install]
WantedBy=multi-user.target

0 comments on commit 14ee2f9

Please sign in to comment.