Skip to content

Commit 72929a5

Browse files
authored
Merge pull request #19 from OSDLabs/dev
- Add option to force sending request to cisco router - Add option to login quietly without output
2 parents 842c366 + cd0b60d commit 72929a5

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ Use terminal to issue this command: ```bitsnet```
2929
Force login attempt
3030
-U
3131
Update program
32+
-w
33+
Force sending request to wireless
34+
-q
35+
Quiet mode. Don't send a notification
3236
-h
3337
Display help
3438
```

bitsnet

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source ~/.local/lib/bitsnet/util.sh
77
source ~/.bitsnetrc
88

99
# Parse arguments
10-
while getopts "u:p:dhUof" o; do
10+
while getopts "u:p:dhUofwq" o; do
1111
case "${o}" in
1212
u)
1313
username=${OPTARG}
@@ -32,6 +32,9 @@ while getopts "u:p:dhUof" o; do
3232
w)
3333
cisco=1
3434
;;
35+
q)
36+
quiet=1
37+
;;
3538
h | * | [?])
3639
show_help
3740
;;

util.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ function show_help {
2020
force login attempt
2121
-U
2222
update
23+
-w
24+
Force sending request to wireless
25+
-q
26+
Quiet mode. Don't send a notification
2327
-h
2428
display help"
2529
exit
@@ -42,7 +46,7 @@ function extract_msg {
4246
}
4347

4448
function send_msg {
45-
if [[ debug -eq 0 ]]; then
49+
if [[ $debug == 0 || $quiet != 1 ]]; then
4650
notify-send 'BITSnet' "$1" --icon=network-transmit
4751
else
4852
debug_msg "reply: $1"

0 commit comments

Comments
 (0)