fstools: add the new fstools package
[openwrt.git] / package / system / ubox / files / log.init
index 1c288a7..bc8c4ed 100644 (file)
@@ -4,6 +4,7 @@
 # start after and stop before networking
 START=12
 STOP=89
+PIDCOUNT=0
 
 USE_PROCD=1
 PROG=/sbin/logread
@@ -22,6 +23,7 @@ validate_log_section()
 
 start_service_file()
 {
+       PIDCOUNT="$(( ${PIDCOUNT} + 1))"
        local pid_file="/var/run/logread.${PIDCOUNT}.pid"
        local log_file log_size
 
@@ -39,6 +41,7 @@ start_service_file()
 
 start_service_remote()
 {
+       PIDCOUNT="$(( ${PIDCOUNT} + 1))"
        local pid_file="/var/run/logread.${PIDCOUNT}.pid"
        local log_ip log_port log_proto log_prefix
 
@@ -57,7 +60,7 @@ start_service_remote()
 
 service_triggers()
 {
-       procd_add_config_trigger "system" "/etc/init.d/log" "start"
+       procd_add_reload_trigger "system"
        procd_add_validation validate_log_section
 }