feat: rebranded from vpn-router to linux-manager.

This commit is contained in:
slawek committed 2026-11-22 09:51:07 +01:00
1 parent 8efe21bfa6
commit 85a1ffa21f
238 files changed
+5010 -3761

No files matched your search

+62 -42
View File
@@ -2,7 +2,7 @@
set -e
. /usr/share/debconf/confmodule
# An upgrade (configure with the old version) asks nothing; vpn-router.json holds the
# An upgrade (configure with the old version) asks nothing; linux-manager.json holds the
# configuration, and dpkg-reconfigure asks the questions again.
if [ "$1" = "configure" ] && [ -n "$2" ]; then
exit 0
@@ -12,69 +12,89 @@ fi
# preseeded completes without prompting. The defaults are platform "none" and
# mode "manual", which together mean: install the files, configure nothing.
# The Router Manager's first administrator, asked whatever the platform is; the password only with a name.
db_input medium vpn-router/admin_username || true
# The Manager's first administrator, asked whatever the platform is; the password only with a name.
db_input medium linux-manager/admin_username || true
db_go || true
db_get vpn-router/admin_username
db_get linux-manager/admin_username
if [ -n "$RET" ]; then
db_input medium vpn-router/admin_password || true
db_input medium linux-manager/admin_password || true
db_go || true
fi
db_input high vpn-router/platform || true
db_input high linux-manager/platform || true
db_go || true
db_get vpn-router/platform
db_get linux-manager/platform
if [ "$RET" = "none" ]; then
# Configuration is deferred. Asking anything else would collect answers
# that nothing is going to apply.
exit 0
fi
db_input high vpn-router/mode || true
db_input high linux-manager/mode || true
db_input high linux-manager/router_enabled || true
db_input high linux-manager/vpn_enabled || true
db_go || true
db_get linux-manager/router_enabled
ROUTER="$RET"
db_get linux-manager/vpn_enabled
VPN="$RET"
# The mode says how much the operator supplies, so it decides which interface
# and address questions are worth asking.
db_get vpn-router/mode
case "$RET" in
manual)
db_input high vpn-router/external_interface || true
db_input high vpn-router/internal_interface || true
db_input high vpn-router/int_addr || true
db_input high vpn-router/int_gateway_ip || true
;;
interfaces)
db_input high vpn-router/external_interface || true
db_input high vpn-router/internal_interface || true
;;
auto)
# and address questions are worth asking; without the router the server has
# only the external interface.
db_get linux-manager/mode
MODE="$RET"
case "$MODE" in
manual|interfaces)
db_input high linux-manager/external_interface || true
;;
esac
if [ "$ROUTER" = "true" ]; then
case "$MODE" in
manual)
db_input high linux-manager/internal_interface || true
db_input high linux-manager/int_addr || true
db_input high linux-manager/int_gateway_ip || true
;;
interfaces)
db_input high linux-manager/internal_interface || true
;;
esac
fi
db_go || true
db_input high vpn-router/local_fqdn || true
db_input high vpn-router/local_id_mode || true
db_input high vpn-router/local_cidrs || true
db_input high vpn-router/remote_addrs || true
db_input high vpn-router/remote_id || true
db_input high vpn-router/remote_cidrs || true
db_input high vpn-router/psk || true
db_input high vpn-router/pki_root_name || true
db_input high vpn-router/p2s_enabled || true
db_input high vpn-router/wg_enabled || true
db_input high linux-manager/local_fqdn || true
if [ "$ROUTER" = "true" ] || [ "$VPN" = "true" ]; then
db_input high linux-manager/local_cidrs || true
fi
if [ "$ROUTER" = "true" ]; then
db_input high linux-manager/local_id_mode || true
db_input high linux-manager/remote_addrs || true
db_input high linux-manager/remote_id || true
db_input high linux-manager/remote_cidrs || true
db_input high linux-manager/psk || true
fi
db_input high linux-manager/pki_root_name || true
if [ "$VPN" = "true" ]; then
db_input high linux-manager/p2s_enabled || true
db_input high linux-manager/wg_enabled || true
fi
db_go || true
db_get vpn-router/p2s_enabled
if [ "$RET" = "true" ]; then
db_input high vpn-router/p2s_address_pool || true
db_go || true
fi
if [ "$VPN" = "true" ]; then
db_get linux-manager/p2s_enabled
if [ "$RET" = "true" ]; then
db_input high linux-manager/p2s_address_pool || true
db_go || true
fi
db_get vpn-router/wg_enabled
if [ "$RET" = "true" ]; then
db_input high vpn-router/wg_address || true
db_input high vpn-router/wg_listen_port || true
db_go || true
db_get linux-manager/wg_enabled
if [ "$RET" = "true" ]; then
db_input high linux-manager/wg_address || true
db_input high linux-manager/wg_listen_port || true
db_go || true
fi
fi