blob: 61b094c778eee413dbf1897ebeea9e19caabcfe3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/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
|