]> git.ipfire.org Git - people/stevee/network.git/blobdiff - hooks/zones/aiccu
aiccu: Rename variables for credentials to username and password.
[people/stevee/network.git] / hooks / zones / aiccu
index 05433b057754e789bedbe2d3bd514626966003f6..a40a17b8140a054e2bbb2c8fcfe93c97571afbff 100755 (executable)
 
 . /usr/lib/network/header-zone
 
-HOOK_SETTINGS="HOOK PROTOCOL REQUIRE_TLS USER SECRET SERVER TUNNEL_ID"
+HOOK_SETTINGS="HOOK PASSWORD PROTOCOL REQUIRE_TLS USERNAME SERVER TUNNEL_ID"
 
-USER=
-SECRET=
+USERNAME=
+PASSWORD=
 SERVER="tic.sixxs.net"
 PROTOCOL="tic"
 TUNNEL_ID=
 REQUIRE_TLS="true"
 
 function _check() {
-       assert isset USER
-       assert isset SECRET
+       assert isset USERNAME
+       assert isset PASSWORD
        assert isset SERVER
        assert isset PROTOCOL
        assert isset REQUIRE_TLS
@@ -43,11 +43,11 @@ function _parse_cmdline() {
 
        while [ $# -gt 0 ]; do
                case "$1" in
-                       --user=*)
-                               USER="$(cli_get_val ${1})"
+                       --username=*)
+                               USERNAME="$(cli_get_val ${1})"
                                ;;
-                       --secret=*)
-                               SECRET="$(cli_get_val ${1})"
+                       --password=*)
+                               PASSWORD="$(cli_get_val ${1})"
                                ;;
                        --server=*)
                                SERVER="$(cli_get_val ${1})"
@@ -105,7 +105,7 @@ function _status() {
        zone_config_read ${zone}
 
        cli_headline 2 "Configuration"
-       cli_print_fmt1 2 "User" "${USER}"
+       cli_print_fmt1 2 "User" "${USERNAME}"
        cli_print_fmt1 2 "Secret" "<hidden>"
        cli_space
        cli_print_fmt1 2 "Server" "${SERVER}"