Compare commits
1 Commits
myip-1.2.1
...
myip-1.2.2
| Author | SHA1 | Date | |
|---|---|---|---|
| 1338affe83 |
@@ -1,3 +1,12 @@
|
|||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
MyIP V 1.2.2 - A. GIBERT - 2026/09/13
|
||||||
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
- Add VSL support,
|
||||||
|
- Support now rx3-base 1.2.0.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
MyIP V 1.2.1 - A. GIBERT - 2026/05/03
|
MyIP V 1.2.1 - A. GIBERT - 2026/05/03
|
||||||
------------------------------------------------------------------------------------------------------------------------------------
|
------------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
|
|
||||||
%define name myip
|
%define name myip
|
||||||
%define version 1.2.1
|
%define version 1.2.2
|
||||||
%define release %mkrel 1rx3
|
%define release %mkrel 1rx3
|
||||||
|
|
||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
@@ -130,6 +130,9 @@ install -D -pm 755 www/cgi-bin/%{name}.cgi %{buildroot}%{_webcgi}/%{name}
|
|||||||
#-----------------------------------------------------------------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Sep 13 2026 Arnaud G. GIBERT <arnaud@rx3.net> - 1.2.2-1rx3.mga9
|
||||||
|
- Update to 1.2.2
|
||||||
|
|
||||||
* Sun May 3 2026 Arnaud G. GIBERT <arnaud@rx3.net> - 1.2.1-1rx3.mga9
|
* Sun May 3 2026 Arnaud G. GIBERT <arnaud@rx3.net> - 1.2.1-1rx3.mga9
|
||||||
- Update to 1.2.1
|
- Update to 1.2.1
|
||||||
- Add bash completion script
|
- Add bash completion script
|
||||||
|
|||||||
35
bin/myip
35
bin/myip
@@ -39,14 +39,14 @@
|
|||||||
# Global Variables
|
# Global Variables
|
||||||
#-----------------------------------------------------------------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
declare -g VERSION="1.2.1"
|
declare -g VERSION="1.2.2"
|
||||||
declare -g NAME="MyIP"
|
declare -g NAME="MyIP"
|
||||||
declare -g HELP="usage: [-h | --help] | [-V | --version] | [-i | --internal] | [-a | --all] [-T | --test] [-v | --verbose] "
|
declare -g HELP="usage: [-h | --help] | [-V | --version] | [-i | --internal] | [-a | --all] [-T | --test] [-v | --verbose] "
|
||||||
|
|
||||||
|
declare -g EXIT_CODE=0
|
||||||
declare -g MODE="EXTERNAL"
|
declare -g MODE="EXTERNAL"
|
||||||
declare -g VERBOSE="FALSE"
|
declare -g VERBOSE="FALSE"
|
||||||
declare -g DRY_RUN="FALSE"
|
declare -g DRY_RUN="FALSE"
|
||||||
declare -g RETVAL=0
|
|
||||||
|
|
||||||
declare -g WEB_SERVER_NAME="www.rx3"
|
declare -g WEB_SERVER_NAME="www.rx3"
|
||||||
declare -g WEB_SERVER_IP="10.0.0.65"
|
declare -g WEB_SERVER_IP="10.0.0.65"
|
||||||
@@ -78,7 +78,6 @@ myip_version_print()
|
|||||||
|
|
||||||
myip_help_print()
|
myip_help_print()
|
||||||
{
|
{
|
||||||
myip_version_print
|
|
||||||
help_print
|
help_print
|
||||||
echo " default: external IP"
|
echo " default: external IP"
|
||||||
echo " -i: internal IP"
|
echo " -i: internal IP"
|
||||||
@@ -106,9 +105,9 @@ myip_args_parse()
|
|||||||
case "$1" in
|
case "$1" in
|
||||||
# Mode switches
|
# Mode switches
|
||||||
-a|--all) MODE="ALL"; shift;;
|
-a|--all) MODE="ALL"; shift;;
|
||||||
-h|--help) MODE="EXIT"; myip_help_print; shift;;
|
-h|--help) MODE="HELP"; shift;;
|
||||||
-i|--internal) MODE="INTERNAL"; shift;;
|
-i|--internal) MODE="INTERNAL"; shift;;
|
||||||
-V|--version) MODE="EXIT"; myip_version_print; shift;;
|
-V|--version) MODE="VERSION"; shift;;
|
||||||
|
|
||||||
# Global options
|
# Global options
|
||||||
-T|--test) DRY_RUN="TRUE"; shift;;
|
-T|--test) DRY_RUN="TRUE"; shift;;
|
||||||
@@ -210,14 +209,27 @@ myip_external_get()
|
|||||||
# Main
|
# Main
|
||||||
#-----------------------------------------------------------------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
vsl_add
|
||||||
|
|
||||||
myip_args_parse "$@"
|
myip_args_parse "$@"
|
||||||
|
|
||||||
|
|
||||||
|
case "${MODE}" in
|
||||||
|
"EXIT")
|
||||||
|
exit ${EXIT_CODE}
|
||||||
|
;;
|
||||||
|
|
||||||
|
"HELP")
|
||||||
|
myip_help_print
|
||||||
|
exit ${EXIT_CODE}
|
||||||
|
;;
|
||||||
|
|
||||||
|
"VERSION")
|
||||||
|
myip_version_print
|
||||||
|
exit ${EXIT_CODE}
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ "${MODE}" == "EXIT" ]]
|
|
||||||
then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
dns_init
|
dns_init
|
||||||
|
|
||||||
@@ -237,10 +249,11 @@ case "${MODE}" in
|
|||||||
|
|
||||||
*)
|
*)
|
||||||
myip_help_print
|
myip_help_print
|
||||||
RETVAL=1
|
EXIT_CODE=1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
dns_deinit
|
dns_deinit
|
||||||
|
|
||||||
exit ${RETVAL}
|
|
||||||
|
exit ${EXIT_CODE}
|
||||||
|
|||||||
Reference in New Issue
Block a user