Skip to content

Commit

Permalink
Merge pull request #19 from OSDLabs/dev
Browse files Browse the repository at this point in the history
- Add option to force sending request to cisco router
- Add option to login quietly without output
  • Loading branch information
utkarshme authored Mar 27, 2017
2 parents 842c366 + cd0b60d commit 72929a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ Use terminal to issue this command: ```bitsnet```
Force login attempt
-U
Update program
-w
Force sending request to wireless
-q
Quiet mode. Don't send a notification
-h
Display help
```
Expand Down
5 changes: 4 additions & 1 deletion bitsnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source ~/.local/lib/bitsnet/util.sh
source ~/.bitsnetrc

# Parse arguments
while getopts "u:p:dhUof" o; do
while getopts "u:p:dhUofwq" o; do
case "${o}" in
u)
username=${OPTARG}
Expand All @@ -32,6 +32,9 @@ while getopts "u:p:dhUof" o; do
w)
cisco=1
;;
q)
quiet=1
;;
h | * | [?])
show_help
;;
Expand Down
6 changes: 5 additions & 1 deletion util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ function show_help {
force login attempt
-U
update
-w
Force sending request to wireless
-q
Quiet mode. Don't send a notification
-h
display help"
exit
Expand All @@ -42,7 +46,7 @@ function extract_msg {
}

function send_msg {
if [[ debug -eq 0 ]]; then
if [[ $debug == 0 || $quiet != 1 ]]; then
notify-send 'BITSnet' "$1" --icon=network-transmit
else
debug_msg "reply: $1"
Expand Down

0 comments on commit 72929a5

Please sign in to comment.