File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -463,6 +463,22 @@ function wd-query()
463463alias wd-q=' wd-query'
464464alias wdq=' wd-query'
465465
466+ function wd-myip()
467+ {
468+ local my_ip
469+ local rc
470+
471+ curl -s ifconfig.me > /tmp/myip.txt
472+ rc=$?
473+ if [[ ${rc} -ne 0 ]]; then
474+ echo " ERROR: 'curl ifconfig.me' => ${rc} "
475+ return 1
476+ fi
477+ my_ip=$( < /tmp/myip.txt)
478+ echo " My public IP = ${my_ip} "
479+ return 0
480+ }
481+
466482# ## Reloads these functions and aliases into the users running bash (must be an alias)
467483alias wd-rc=' source ~/wsprdaemon/.wd_bash_aliases'
468484alias wdrc=' wd-rc'
@@ -480,7 +496,7 @@ wd-upload-wd wd-uw wdlw Watch the 'upload to wsprdaemon' log
480496wd-errors wd-e wdle Each 10 seconds, search all the log files and print newly logged 'ERROR' lines
481497wd-overloads wd-ov wdov Prints all overload events recorded in the wav and ADC log files
482498wd-query wd-q wdq Query the wsprdaemon database for spots
483- "
499+ wd-myip *** Prints the public IP address of this server "
484500}
485501alias wd-=' wd-help'
486502alias wd-h=' wd-help'
You can’t perform that action at this time.
0 commit comments