You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
-
156
120
## Setting Up as a Service
157
121
158
122
### Linux
@@ -287,6 +251,61 @@ NoirNet uses a configuration file to store default settings. The default locatio
287
251
- Check the status of the task in Task Scheduler to ensure it is running.
288
252
- Verify that NoirNet is running by checking the log file or the expected notifications.
289
253
254
+
## Usage
255
+
256
+
Run the script with the desired options. Below are some examples:
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
+
290
309
## Options
291
310
292
311
### General Options
@@ -307,9 +326,8 @@ NoirNet uses a configuration file to store default settings. The default locatio
307
326
-`-C, --clean`: Delete all cached files.
308
327
-`-k, --cache-dir <path>`: Specify a custom cache directory.
309
328
310
-
### Execution Options
329
+
### Notification Options
311
330
312
-
-`-i, --interval <seconds>`: Set the interval between checks (default: 60 seconds).
313
331
-`-p, --pushover`: Send Pushover notifications.
314
332
-`-a, --api-token <token>`: Specify the API token for Pushover notifications.
315
333
-`-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
324
342
325
343
### Network Check Configuration
326
344
345
+
-`-i, --interval <seconds>`: Set the interval between checks (default: 60 seconds).
327
346
-`-P, --ping-target <IP>`: Set a custom ping target (default: 8.8.8.8).
328
347
-`-D, --dns-test-domain <domain>`: Set a custom DNS test domain (default: example.com).
329
348
-`-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:
350
369
1.**Navigate to the Test Directory**:
351
370
352
371
```bash
353
-
cd path/to/noirnet
372
+
cdtest
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"
354
391
```
355
392
356
-
2.**Make the test script executable**:
393
+
3.**Make the test script executable**:
357
394
358
395
```bash
359
396
chmod +x test.sh
360
397
```
361
398
362
-
3.**Run the Test Script with Default Configuration**:
399
+
4.**Run the Test Script with Default Configuration**:
363
400
364
401
```bash
365
402
./test.sh
366
403
```
367
404
368
-
4.**Run the Test Script with a Custom Configuration File**:
405
+
5.**Run the Test Script with a Custom Configuration File**:
0 commit comments