This shows you the differences between two versions of the page.
| — | sdk:scripts:update-config [2015/05/05 15:04] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== SDK Script update-config.are ====== | ||
| + | <code c update-config.are> | ||
| + | /* DESC: This script can be used to perform a configuration update | ||
| + | * Copyright (C) 2013 NetModule AG, Switzerland | ||
| + | */ | ||
| + | |||
| + | dir = "/ | ||
| + | url = sprintf(" | ||
| + | |||
| + | mkdir(dir, S_IRUSR|S_IWUSR|S_IXUSR); | ||
| + | mkdir(sprintf(" | ||
| + | |||
| + | cfg = sprintf(" | ||
| + | fp = fopen(cfg, " | ||
| + | if (!fp) { | ||
| + | printf(" | ||
| + | exit(1); | ||
| + | } | ||
| + | fwrite(fp, " | ||
| + | fwrite(fp, " | ||
| + | fwrite(fp, " | ||
| + | fclose(fp); | ||
| + | |||
| + | rc = nb_update_config(url); | ||
| + | printf(" | ||
| + | |||
| + | exit(rc); | ||
| + | |||
| + | </ | ||