mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
20 lines
381 B
Bash
20 lines
381 B
Bash
#!/bin/sh
|
|
|
|
. /lib/functions.sh
|
|
|
|
set_inform_time()
|
|
{
|
|
local sec inform_time value
|
|
|
|
config_load cwmp
|
|
config_get inform_time acs periodic_inform_time '0001-01-01T00:00:00Z'
|
|
|
|
if [ "${inform_time}" == "0001-01-01T00:00:00Z" ]; then
|
|
sec=$(date +%s)
|
|
value="$(date -d @$(($sec-$RANDOM)) +%Y-%m-%dT%H:%M:%SZ)"
|
|
|
|
uci_set cwmp acs periodic_inform_time "$value"
|
|
fi
|
|
}
|
|
|
|
set_inform_time
|