#!/bin/sh /etc/rc.common USE_PROCD=1 START=30 handle_data_type_config() { local cfg="$1" config_get name "$cfg" name config_get scope "$cfg" scope config_get ttl "$cfg" ttl config_get update_interval "$cfg" update_interval shared-state-async register $name $scope $update_interval $ttl } start_service() { sharedStateConfDir="/tmp/shared-state/" sharedStateConfFile="${sharedStateConfDir}/shared-state-async.conf" mkdir -p "$sharedStateConfDir" echo "{}" > "$sharedStateConfFile" config_load shared-state config_foreach handle_data_type_config dataType procd_open_instance procd_set_param command shared-state-async peer procd_set_param respawn procd_set_param stderr 1 procd_set_param term_timeout 10 procd_close_instance }