mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
parent
96bef0c085
commit
31a0a8e74f
1 changed files with 3 additions and 5 deletions
|
@ -319,8 +319,6 @@ It is also possible to use a DHCP reservation, but if you are going to do that,
|
||||||
}
|
}
|
||||||
|
|
||||||
setDHCPCD() {
|
setDHCPCD() {
|
||||||
# First, create the dhcpd config file
|
|
||||||
touch ${dhcpcdFile}
|
|
||||||
# Append these lines to dhcpcd.conf to enable a static IP
|
# Append these lines to dhcpcd.conf to enable a static IP
|
||||||
echo "## interface ${pivpnInterface}
|
echo "## interface ${pivpnInterface}
|
||||||
static ip_address=${IPv4addr}
|
static ip_address=${IPv4addr}
|
||||||
|
@ -330,7 +328,7 @@ setDHCPCD() {
|
||||||
|
|
||||||
setStaticIPv4() {
|
setStaticIPv4() {
|
||||||
# Tries to set the IPv4 address
|
# Tries to set the IPv4 address
|
||||||
if [[ -f ${dhcpcdFile} ]]; then
|
if [[ -f /etc/dhcpcd.conf ]]; then
|
||||||
if grep -q "${IPv4addr}" ${dhcpcdFile}; then
|
if grep -q "${IPv4addr}" ${dhcpcdFile}; then
|
||||||
echo "::: Static IP already configured."
|
echo "::: Static IP already configured."
|
||||||
:
|
:
|
||||||
|
|
Loading…
Reference in a new issue