Updates to /etc/local/services no longer require reboot (#1119)

This commit is contained in:
Tim Wilkinson 2024-03-24 23:10:42 -07:00 committed by GitHub
parent b1c85fa281
commit 6be1091ffb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -106,7 +106,8 @@ local changes = {
dnsmasq = false,
firewall = false,
tunnels = false,
wireless = false
wireless = false,
localservices = false
}
function valid_config(config)
@ -1109,7 +1110,7 @@ if sf then
sf:close()
local _, diff = filecopy("/tmp/local_services", "/etc/local/services", true)
if diff then
changes.reboot = true
changes.localservices = true
end
os.remove("/tmp/local_services")
nixio.fs.chmod("/etc/local/services", "777")

View File

@ -34,7 +34,7 @@ true <<'LICENSE'
LICENSE
ROOT="/tmp/reboot-required"
SERVICES="log system firewall network wireless dnsmasq tunnels manager olsrd"
SERVICES="log system firewall network wireless dnsmasq tunnels manager olsrd localservices"
ignore=0
force=0
@ -72,6 +72,8 @@ do
/etc/init.d/vtundsrv restart > /dev/null 2>&1
elif [ $srv = "wireless" ]; then
/sbin/wifi reload > /dev/null 2>&1
elif [ $srv = "localservices" ]; then
/etc/local/services > /dev/null 2>&1
elif [ -x /etc/init.d/$srv ]; then
/etc/init.d/$srv restart > /dev/null 2>&1
fi