]> git.ipfire.org Git - people/stevee/network.git/blobdiff - src/functions/functions.radvd
Ensure that radvd is started when needed
[people/stevee/network.git] / src / functions / functions.radvd
index 1e84b35f5d7f8facc0b56c0b22d1efbf1b27efba..2079554ae62b5837d0fd97f436c29b33f22907a0 100644 (file)
@@ -25,8 +25,14 @@ radvd_update() {
        # (Re-)write the configuration file
        radvd_write_config
 
-       # Reload the radvd service.
-       service_reload radvd
+       # Reload the radvd service if it is already running
+       if service_is_active radvd; then
+               service_reload radvd
+               return ${EXIT_OK}
+       fi
+
+       # Start the radvd service
+       service_start radvd
 }
 
 radvd_write_config() {