1
1
mirror of https://github.com/angristan/wireguard-install.git synced 2024-05-31 18:50:47 +00:00

add some comments

This commit is contained in:
BlackcatRs 2021-03-25 20:08:07 +01:00
parent 5c41fa0ab5
commit e987ccd427

View File

@ -208,7 +208,7 @@ net.ipv6.conf.all.forwarding = 1" >/etc/sysctl.d/wg.conf
# Check if WireGuard is running
systemctl is-active --quiet "wg-quick@${SERVER_WG_NIC}"
WG_RUNNING=$?
WG_RUNNING=$? # exit status of the previously run command
# WireGuard might not work if we updated the kernel. Tell the user to reboot
if [[ ${WG_RUNNING} -ne 0 ]]; then
@ -235,7 +235,7 @@ function newClient() {
echo ""
fi
done
# max number of client supported
for DOT_IP in {2..254}; do
DOT_EXISTS=$(grep -c "${SERVER_WG_IPV4::-1}${DOT_IP}" "/etc/wireguard/${SERVER_WG_NIC}.conf")
if [[ ${DOT_EXISTS} == '0' ]]; then