Add header

This commit is contained in:
hwdsl2 2022-10-03 21:25:40 -05:00
parent d86412b9a4
commit d069673874

View File

@ -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