mirror of
https://github.com/TrustTunnel/TrustTunnel.git
synced 2026-04-15 07:30:45 +00:00
Squashed commit of the following:
commit 1d828ee59a64e1926d895a23677435b1972f434c
Merge: 1ece6a7 33d189f
Author: Andrey Yakushin <a.yakushin@adguard.com>
Date: Wed Dec 17 19:14:44 2025 +0400
Merge remote-tracking branch 'origin/master' into feature/TRUST-188
commit 1ece6a77faa904b6b894ce0a8a5e27b323a8924b
Author: Andrey Yakushin <a.yakushin@adguard.com>
Date: Wed Dec 17 17:43:07 2025 +0400
Rename vpn_libs_endpoint to trusttunnel
commit 61cfef7646ddd84817cf0c8b8256a2a1a204ab75
Author: Andrey Yakushin <a.yakushin@adguard.com>
Date: Wed Dec 17 17:42:33 2025 +0400
Rename vpn-endpoint to trusttunnel-endpoint
commit fb6359519d0fe37cf6ea492ab8358bcb721133d4
Author: Andrey Yakushin <a.yakushin@adguard.com>
Date: Wed Dec 17 17:34:06 2025 +0400
Rename vpn_endpoint to trusttunnel_endpoint
34 lines
715 B
Bash
34 lines
715 B
Bash
#!/bin/bash
|
|
|
|
check_file() {
|
|
local file="$1"
|
|
if [ ! -f "$file" ]; then
|
|
echo "Configuration file '$file' not found"
|
|
return 1
|
|
fi
|
|
return 0
|
|
}
|
|
|
|
verify_configs() {
|
|
local missing=0
|
|
|
|
check_file "credentials.toml" || missing=1
|
|
check_file "vpn.toml" || missing=1
|
|
|
|
return $missing
|
|
}
|
|
|
|
main() {
|
|
is_interactive=0
|
|
[ ! -t 0 ] || is_interactive=1
|
|
if [ ! verify_configs ] && [ ! -t 0 ]; then
|
|
echo "Missing configuration file(s). Run this containter in an interactive mode to complete setup."
|
|
exit 1
|
|
else
|
|
echo "Missing configuration file(s). Launching setup wizard."
|
|
setup_wizard
|
|
fi
|
|
trusttunnel_endpoint vpn.toml hosts.toml
|
|
}
|
|
|
|
main |