You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
846 B
Bash
42 lines
846 B
Bash
#!/bin/sh
|
|
|
|
. /lib/functions.sh
|
|
. /usr/lib/configsync_lib.sh
|
|
|
|
CS_SERVICE=csghn
|
|
SERVICE=ghn
|
|
PSERVICE=${CS_PREFIX}${SERVICE}
|
|
|
|
my_logger() {
|
|
logger -t configsync_executor "${CS_SERVICE}" "${@}"
|
|
}
|
|
|
|
configsync_to_system()
|
|
{
|
|
# make working copy and get values from there step by step
|
|
uci_cs export $CS_SERVICE | uci_tmp import $CS_SERVICE
|
|
|
|
my_logger "This is ${0} configsync_to_system()!"
|
|
|
|
VALUE=$(uci_tmp get ${CS_SERVICE}.ghn.powersave)
|
|
uci_tmp set ${PSERVICE}.ghn.powersave="${VALUE}"
|
|
|
|
add_to_list $CS_IMPORTSERVICELIST ${SERVICE}
|
|
}
|
|
|
|
dynamic_update()
|
|
{
|
|
my_logger "This is ${0} dynamic_update()!"
|
|
}
|
|
|
|
init()
|
|
{
|
|
my_logger "This is ${0} init()!"
|
|
}
|
|
|
|
if [ "${1}" = "init" ] || [ "${1}" = "configsync_to_system" ] || [ "${1}" = "dynamic_update" ]; then
|
|
"${@}"
|
|
else
|
|
my_logger "Unknown command ${1} in ${0}!"
|
|
fi
|