Update User Agent String
[framework/web/wrt-commons.git] / etc / wrt_commons_create_clean_db.sh
1 #!/bin/sh
2 # Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3 #
4 #    Licensed under the Apache License, Version 2.0 (the "License");
5 #    you may not use this file except in compliance with the License.
6 #    You may obtain a copy of the License at
7 #
8 #        http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #    Unless required by applicable law or agreed to in writing, software
11 #    distributed under the License is distributed on an "AS IS" BASIS,
12 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #    See the License for the specific language governing permissions and
14 #    limitations under the License.
15 #
16
17 for name in wrt wrt_autosave
18 do
19     rm -f /opt/dbspace/.$name.db
20     rm -f /opt/dbspace/.$name.db-journal
21     SQL="PRAGMA journal_mode = PERSIST;"
22     sqlite3 /opt/dbspace/.$name.db "$SQL"
23     SQL=".read /usr/share/wrt-engine/"$name"_db.sql"
24     sqlite3 /opt/dbspace/.$name.db "$SQL"
25     touch /opt/dbspace/.$name.db-journal
26     chown 0:6026 /opt/dbspace/.$name.db
27     chown 0:6026 /opt/dbspace/.$name.db-journal
28     chmod 660 /opt/dbspace/.$name.db
29     chmod 660 /opt/dbspace/.$name.db-journal
30 done
31
32