#!/bin/sh

if [ -e /etc/.oebuild ] || [ -e /etc/.ovbuild ];then
	opkg update
	opkg install titan-plugin-tools-instar --dest $1
fi

INSTDIR="$1" 
PLUGINDIR="$INSTDIR/usr/local/share/titan/plugins/instar"

if [ -e /tmp/instar.conf ]; then
	mv "$PLUGINDIR/instar.conf" "$PLUGINDIR/instar.conf_org"
	cp /tmp/instar.conf "$PLUGINDIR/instar.conf"
	rm /tmp/instar.conf
fi

exit 0
