#!/bin/sh unique_append() { grep -qF "$1" "$2" || echo "$1" >> "$2" } uci set shared-state.babel_links_info=dataType uci set shared-state.babel_links_info.name='babel_links_info' uci set shared-state.babel_links_info.scope='community' uci set shared-state.babel_links_info.ttl='2400' uci set shared-state.babel_links_info.update_interval='30' uci commit shared-state unique_append \ '*/30 * * * * ((sleep $(($RANDOM % 120)); shared-state-publish_babel_links_info &> /dev/null)&)' \ /etc/crontabs/root