-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
0 additions
and
11 deletions.
There are no files selected for viewing
11 changes: 0 additions & 11 deletions
11
...aults/shared-state_mesh_wide_upgrade_cron → ...s/shared-state_mesh_wide_upgrade_register
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
#!/bin/sh | ||
|
||
unique_append() | ||
{ | ||
grep -qF "$1" "$2" || echo "$1" >> "$2" | ||
} | ||
|
||
uci set shared-state.mesh_wide_upgrade=dataType | ||
uci set shared-state.mesh_wide_upgrade.name='mesh_wide_upgrade' | ||
uci set shared-state.mesh_wide_upgrade.scope='community' | ||
uci set shared-state.mesh_wide_upgrade.ttl='2400' | ||
uci set shared-state.mesh_wide_upgrade.update_interval='30' | ||
uci commit shared-state | ||
|
||
unique_append \ | ||
'*/30 * * * * ((sleep $(($RANDOM % 120)); shared-state-publish_mesh_wide_upgrade &> /dev/null)&)' \ | ||
/etc/crontabs/root | ||
|