Changeset 37249


Ignore:
Timestamp:
2013-07-11T19:00:59+02:00 (5 years ago)
Author:
blogic
Message:

procd: add proto and trigger support to the /etc/init.d/log

Signed-off-by: John Crispin <blogic@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/system/procd/files/log.init

    r37206 r37249  
    3232{ 
    3333        local pid_file="/var/run/logread.${PIDCOUNT}.pid" 
    34         local log_ip log_port 
     34        local log_ip log_port log_proto 
    3535 
    3636        config_get log_ip $1 log_ip 
    3737        config_get log_port $1 log_port 
     38        config_get log_proto $1 log_proto 
    3839 
    3940        [ -z "${log_port}" -o -z "${log_ip}" ] && return 
     
    4142        procd_open_instance 
    4243        procd_set_param command "$PROG" -f -r "$log_ip" "$log_port" -p "$pid_file" 
     44        [ "${log_proto}" = "udp" ] && procd_append_param command -u 
    4345        procd_close_instance 
    4446 
    4547        PIDCOUNT="$(( ${PIDCOUNT} + 1))" 
     48} 
     49 
     50service_triggers() 
     51{ 
     52        procd_add_config_trigger "system" "/etc/init.d/log" "start" 
    4653} 
    4754 
Note: See TracChangeset for help on using the changeset viewer.