Skip to content

Commit

Permalink
Fix omr-service OpenVPN route setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ysurac committed Nov 29, 2024
1 parent 4b590a1 commit be6a17d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion omr-service
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ _lan_route() {
networkonly=$(ipcalc -n $d | grep Network | awk '{print $2}' | cut -d/ -f1)
netmask=$(ipcalc -n $d | grep Netmask | awk '{print $2}')
[ -n "$network" ] && [ -z "$(ip r show $network via $vpnremoteip)" ] && ip r replace $network via $vpnremoteip >/dev/null 2>&1
[ -n "$networkonly" ] && [ -n "$netmask" ] && [ -z "$(grep $networkonly /etc/openvpn/ccd/${username})" ] && echo "iroute $networkonly $netmask" >> /etc/openvpn/ccd/${username}
[ -n "$networkonly" ] && [ -n "$netmask" ] && ([ ! -f /etc/openvpn/ccd/${username} ] || [ -z "$(grep $networkonly /etc/openvpn/ccd/${username})" ]) && echo "iroute $networkonly $netmask" >> /etc/openvpn/ccd/${username}
fi
done
fi
Expand Down

0 comments on commit be6a17d

Please sign in to comment.