mirror of
https://github.com/hwdsl2/wireguard-install.git
synced 2024-06-03 01:25:20 +02:00
Add header
This commit is contained in:
parent
d86412b9a4
commit
d069673874
|
@ -199,10 +199,28 @@ EOF
|
|||
chmod 600 "$export_dir$client".conf
|
||||
}
|
||||
|
||||
show_header() {
|
||||
cat <<'EOF'
|
||||
|
||||
WireGuard Script 3 Oct 2022
|
||||
https://github.com/hwdsl2/wireguard-install
|
||||
EOF
|
||||
}
|
||||
|
||||
show_header2() {
|
||||
cat <<'EOF'
|
||||
|
||||
Copyright (c) 2022 Lin Song
|
||||
Copyright (c) 2020-2022 Nyr
|
||||
EOF
|
||||
}
|
||||
|
||||
show_usage() {
|
||||
if [ -n "$1" ]; then
|
||||
echo "Error: $1" >&2
|
||||
fi
|
||||
show_header
|
||||
show_header2
|
||||
cat 1>&2 <<EOF
|
||||
|
||||
Usage: bash $0 [options]
|
||||
|
@ -322,11 +340,13 @@ if [[ ! -e /etc/wireguard/wg0.conf ]]; then
|
|||
fi
|
||||
if [ "$auto" = 0 ]; then
|
||||
echo
|
||||
echo 'Welcome to this WireGuard VPN server installer!'
|
||||
echo 'Welcome to this WireGuard server installer!'
|
||||
echo 'GitHub: https://github.com/hwdsl2/wireguard-install'
|
||||
echo
|
||||
echo 'I need to ask you a few questions before starting setup.'
|
||||
echo 'You can use the default options and just press enter if you are OK with them.'
|
||||
else
|
||||
show_header
|
||||
echo
|
||||
echo 'Starting WireGuard setup using default options.'
|
||||
fi
|
||||
|
@ -644,6 +664,7 @@ WantedBy=multi-user.target" >> /etc/systemd/system/wg-iptables.service
|
|||
echo "The client configuration is available in: $export_dir$client.conf"
|
||||
echo "New clients can be added by running this script again."
|
||||
else
|
||||
show_header
|
||||
echo
|
||||
echo "WireGuard is already installed."
|
||||
echo
|
||||
|
|
Loading…
Reference in New Issue
Block a user