#!/bin/sh SEARCHPKG="org.tizen.smartsearch" # create db if [ ! -f /opt/apps/$SEARCHPKG/data/.search.db ] then sqlite3 /opt/apps/$SEARCHPKG/data/.search.db 'PRAGMA journal_mode = PERSIST; CREATE TABLE IF NOT EXISTS search_history (category int, keyword text not null, date TEXT, UNIQUE(category, keyword));' fi # owner & permission if [ ${USER} == "root" ] then chown -R 5000:5000 /opt/apps/$SEARCHPKG/data chown -R 5000:5000 /opt/apps/$SEARCHPKG/data/.search.db chown -R 5000:5000 /opt/apps/$SEARCHPKG/data/.search.db-journal fi chmod 660 /opt/apps/$SEARCHPKG/data/.search.db chmod 660 /opt/apps/$SEARCHPKG/data/.search.db-journal #set default vconf key value vconftool set -t int db/smartsearch/category 0 -u 5000 -g 5000 vconftool set -t string db/smartsearch/keyword '' -u 5000 -g 5000