Skip to content

Commit 9be465d

Browse files
author
John Smith III
committed
Changed: README.md with latest information
1 parent 184dffa commit 9be465d

File tree

1 file changed

+81
-44
lines changed

1 file changed

+81
-44
lines changed

README.md

Lines changed: 81 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ NoirNet monitors internet and DNS access and sends notifications. It supports va
8080

8181
### Windows Installation
8282

83-
1. Install Git for Windows (includes Git Bash, if not installed).
83+
1. Install [Git for Windows](https://gitforwindows.org/) (includes Git Bash, if not installed).
8484

8585
2. Clone the repository:
8686

@@ -117,42 +117,6 @@ NoirNet monitors internet and DNS access and sends notifications. It supports va
117117
man noirnet
118118
```
119119

120-
## Usage
121-
122-
Run the script with the desired options. Below are some examples:
123-
124-
- Start monitoring with default settings:
125-
126-
```bash
127-
./noirnet
128-
```
129-
130-
- Specify a custom configuration file:
131-
132-
```bash
133-
./noirnet --config /path/to/config
134-
```
135-
136-
- Run the script in the background:
137-
138-
```bash
139-
./noirnet --start
140-
```
141-
142-
- Send Pushover notifications:
143-
144-
```bash
145-
./noirnet --pushover --api-token YOUR_API_TOKEN --user-key YOUR_USER_KEY
146-
```
147-
148-
## Configuration
149-
150-
NoirNet uses a configuration file to store default settings. The default location is `~/.noirnetrc`. You can initialize a configuration file with default settings using:
151-
152-
```bash
153-
./noirnet --init
154-
```
155-
156120
## Setting Up as a Service
157121

158122
### Linux
@@ -287,6 +251,61 @@ NoirNet uses a configuration file to store default settings. The default locatio
287251
- Check the status of the task in Task Scheduler to ensure it is running.
288252
- Verify that NoirNet is running by checking the log file or the expected notifications.
289253

254+
## Usage
255+
256+
Run the script with the desired options. Below are some examples:
257+
258+
- Start monitoring with default settings:
259+
260+
```bash
261+
./noirnet
262+
```
263+
264+
- Specify a custom configuration file:
265+
266+
```bash
267+
./noirnet --config /path/to/config
268+
```
269+
270+
- Run the script in the background:
271+
272+
```bash
273+
./noirnet --start
274+
```
275+
276+
- Send Pushover notifications:
277+
278+
```bash
279+
./noirnet --pushover --api-token YOUR_API_TOKEN --user-key YOUR_USER_KEY
280+
```
281+
282+
## Configuration
283+
284+
NoirNet uses a configuration file to store default settings. The default location is `$HOME/.config/noirwatch.conf`. You can initialize a configuration file with default settings using:
285+
286+
```bash
287+
./noirnet --init
288+
```
289+
290+
### Example Configuration File
291+
292+
```bash
293+
# NoirWatch Configuration File
294+
CACHE_DIR="/tmp/noirnet_cache"
295+
LOG_FILE="/tmp/noirwatch_cache/noirnet.log"
296+
CONFIG_FILE="$HOME/.config/noirnet.conf"
297+
CHECK_INTERVAL=5
298+
PING_TARGET="8.8.8.8"
299+
DNS_TEST_DOMAIN="example.com"
300+
TIMEOUT=5
301+
PUSHOVER_NOTIFICATION=false
302+
PUSHOVER_API_TOKEN=""
303+
PUSHOVER_USER_KEY=""
304+
DESKTOP_NOTIFICATION=true
305+
VERBOSE=false
306+
LOG_LEVEL="INFO"
307+
```
308+
290309
## Options
291310

292311
### General Options
@@ -307,9 +326,8 @@ NoirNet uses a configuration file to store default settings. The default locatio
307326
- `-C, --clean`: Delete all cached files.
308327
- `-k, --cache-dir <path>`: Specify a custom cache directory.
309328

310-
### Execution Options
329+
### Notification Options
311330

312-
- `-i, --interval <seconds>`: Set the interval between checks (default: 60 seconds).
313331
- `-p, --pushover`: Send Pushover notifications.
314332
- `-a, --api-token <token>`: Specify the API token for Pushover notifications.
315333
- `-u, --user-key <key>`: Specify the user key for Pushover notifications.
@@ -324,6 +342,7 @@ NoirNet uses a configuration file to store default settings. The default locatio
324342

325343
### Network Check Configuration
326344

345+
- `-i, --interval <seconds>`: Set the interval between checks (default: 60 seconds).
327346
- `-P, --ping-target <IP>`: Set a custom ping target (default: 8.8.8.8).
328347
- `-D, --dns-test-domain <domain>`: Set a custom DNS test domain (default: example.com).
329348
- `-T, --timeout <seconds>`: Set the timeout for ping and DNS tests (default: 5 seconds).
@@ -350,28 +369,46 @@ Ensure you have the following installed on your system:
350369
1. **Navigate to the Test Directory**:
351370

352371
```bash
353-
cd path/to/noirnet
372+
cd test
373+
```
374+
375+
2. **Update the Test Configuration File:** Open the test_noirnet.conf file in your preferred text editor and ensure it contains the following configuration:
376+
377+
```bash
378+
# NoirWatch Configuration File
379+
CONFIG_FILE="./test_noirnet.conf"
380+
CACHE_DIR="./test_cache"
381+
LOG_FILE="./test_noirnet.log"
382+
CHECK_INTERVAL=1
383+
PING_TARGET="8.8.8.8"
384+
DNS_TEST_DOMAIN="example.com"
385+
THRESHOLD=1
386+
BACKGROUND=false
387+
PUSHOVER=false
388+
DESKTOP=false
389+
VERBOSE=true
390+
LOG_LEVEL="DEBUG"
354391
```
355392

356-
2. **Make the test script executable**:
393+
3. **Make the test script executable**:
357394

358395
```bash
359396
chmod +x test.sh
360397
```
361398

362-
3. **Run the Test Script with Default Configuration**:
399+
4. **Run the Test Script with Default Configuration**:
363400

364401
```bash
365402
./test.sh
366403
```
367404

368-
4. **Run the Test Script with a Custom Configuration File**:
405+
5. **Run the Test Script with a Custom Configuration File**:
369406

370407
```bash
371408
./test.sh /path/to/custom_config_file
372409
```
373410

374-
5. **Clean Up Test Files (optional)**:
411+
6. **Clean Up Test Files (optional)**:
375412

376413
```bash
377414
rm -rf ./test_cache

0 commit comments

Comments
 (0)