I am using the the cfg interface to have some application specific configuration data. An issue that I see is that every time I upgrade the application the configuration data is lost. At the moment I use “config export” and “config import” as a workaround.
Is it supposed to be like this?
Currently the upgrade process is to first uninstall the application, which includes it’s private config tree. Then to install the new version of the application as a seperate step. The problem here of course is that the installer really has no concept of an upgrade.
We are looking at enhancing the process to properly upgrade in place so that assets like app specific config trees are not lost.
Unfortuanly at this time the best workaround is to import and export your config as you have found. If you are installing your app through the command line, you can wrap instapp in a shell script that can automate this for you:
if [ -z “$APP_NAME” ]
>&2 echo “Application name not specified.”
if [ -z “$2” ]
if [ -z “$DEST_IP” ]
>&2 echo “Device IP address not specified.”
#echo "Test: "
ssh root@$DEVICE_IP “/usr/local/bin/config $CMD $APP_NAME:/ ~/$APP_NAME.cfg”
instapp $APP_NAME.ar7 $DEVICE_IP
If you save this script as inst.sh, you can run it as follows:
$ inst.sh <myApp> <myDeviceIP>
$ export DEST_IP=<myDeviceIP>
$ inst.sh myApp