Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ncp/NETWORKING/nc-static-IP.sh')
-rw-r--r--bin/ncp/NETWORKING/nc-static-IP.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/ncp/NETWORKING/nc-static-IP.sh b/bin/ncp/NETWORKING/nc-static-IP.sh
index 3716c017..36c18412 100644
--- a/bin/ncp/NETWORKING/nc-static-IP.sh
+++ b/bin/ncp/NETWORKING/nc-static-IP.sh
@@ -61,7 +61,8 @@ iface $IFACE inet dhcp
auto lo
iface lo inet loopback
EOF
- systemctl restart NetworkManager
+ ifdown "${IFACE}"
+ ifup "${IFACE}"
echo "DHCP enabled"
return
}
@@ -83,8 +84,9 @@ iface $IFACE inet static
gateway $GW
dns-nameservers $DNS 8.8.8.8
EOF
- systemctl restart networking
pkill dhclient
+ ifdown "${IFACE}"
+ ifup "${IFACE}"
}
ncc config:system:set trusted_domains "${TRUSTED_DOMAINS[ip]}" --value="$IP"