Changeset 48915


Ignore:
Timestamp:
2016-03-04T09:33:36+01:00 (2 years ago)
Author:
blogic
Message:

procd: Allow to configure default respawn retry count

Extend /etc/config/system with a parameter to set the
default respawn retry for procd launched services that
have respawn enabled.

config service

option respawn_retry -1

All services that don't specify specific respawn parameters
will get their defaults added by procd.sh. If respawn_retry
is specified in /etc/config/system the default retry limit
will be set to this value by procd.

Signed-off-by: Helmut Schaa <helmut.schaa@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/system/procd/files/procd.sh

    r47862 r48915  
    317317 
    318318_procd_close_instance() { 
     319        local respawn_vals 
     320        if json_select respawn ; then 
     321                json_get_values respawn_vals 
     322                if [ -z "$respawn_vals" ]; then 
     323                        local respawn_retry=$(uci_get system.@service[0].respawn_retry) 
     324                        _procd_add_array_data 3600 5 ${respawn_retry:-5} 
     325                fi 
     326                json_select .. 
     327        fi 
     328 
    319329        json_close_object 
    320330} 
Note: See TracChangeset for help on using the changeset viewer.