]>
git.ipfire.org Git - people/ms/network.git/blob - hooks/zones/aiccu
2 ###############################################################################
4 # IPFire.org - A linux based firewall #
5 # Copyright (C) 2013 IPFire Network Development Team #
7 # This program is free software: you can redistribute it and/or modify #
8 # it under the terms of the GNU General Public License as published by #
9 # the Free Software Foundation, either version 3 of the License, or #
10 # (at your option) any later version. #
12 # This program is distributed in the hope that it will be useful, #
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
15 # GNU General Public License for more details. #
17 # You should have received a copy of the GNU General Public License #
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
20 ###############################################################################
22 .
/usr
/lib
/network
/header-zone
24 HOOK_SETTINGS
="HOOK PROTOCOL REQUIRE_TLS USER SECRET SERVER TUNNEL_ID"
28 SERVER
="tic.sixxs.net"
38 assert isset REQUIRE_TLS
41 function _parse_cmdline
() {
44 while [ $# -gt 0 ]; do
47 USER
="$(cli_get_val ${1})"
50 SECRET
="$(cli_get_val ${1})"
53 SERVER
="$(cli_get_val ${1})"
56 PROTOCOL
="$(cli_get_val ${1})"
59 TUNNEL_ID
="$(cli_get_val ${1})"
62 REQUIRE_TLS
="$(cli_get_val ${1})"
71 echo "Unknown option: $1" >&2
85 zone_config_read
${zone}
88 --server="${SERVER}" \
89 --protocol="${PROTOCOL}" \
91 --secret="${SECRET}" \
92 --tunnel-id="${TUNNEL_ID}" \
93 --require-tls="${REQUIRE_TLS}"
111 cli_device_headline
${zone}
113 zone_config_read
${zone}
115 cli_headline
2 "Configuration"
116 cli_print_fmt1
2 "User" "${USER}"
117 cli_print_fmt1
2 "Secret" "<hidden>"
119 cli_print_fmt1
2 "Server" "${SERVER}"
120 cli_print_fmt1
2 "Protocol" "${PROTOCOL}"
121 if isset TUNNEL_ID
; then
123 cli_print_fmt1
2 "Tunnel ID" "${TUNNEL_ID}"