rc.common: when reloading a service using procd, fall back to calling start instead...
[openwrt/openwrt.git] / package / base-files / files / etc / rc.common
index 829ec76bacff86ba363974c4114605ba6b861895..695fc166fbcd1af6432016511f63d723174a0504 100755 (executable)
@@ -109,18 +109,21 @@ ${INIT_TRACE:+set -x}
 
        start() {
                rc_procd start_service "$@"
+               if eval "type service_started" 2>/dev/null >/dev/null; then
+                       service_started
+               fi
        }
 
        stop() {
-               procd_kill "$(basename ${basescript:-$initscript})" "$1"
                stop_service "$@"
+               procd_kill "$(basename ${basescript:-$initscript})" "$1"
        }
 
        reload() {
                if eval "type reload_service" 2>/dev/null >/dev/null; then
                        reload_service "$@"
                else
-                       restart
+                       start
                fi
        }