Tizen 2.1 base
[apps/home/libslp-alarm.git] / debian / libslp-alarm-0.postinst
1 #!/bin/sh
2
3 sqlite3 /opt/dbspace/.alarm.db 'PRAGMA journal_mode = PERSIST;
4                                create table if not exists alarm (id INTEGER PRIMARY KEY autoincrement, 
5                                                                                                         magic INTEGER,
6                                                                                                         alarm_mgr_id INTEGER, 
7                                                                                                         enable INTEGER, 
8                                                                                                         missed INTEGER, 
9                                                                                                         author INTEGER, 
10                                                                                                         name TEXT, 
11                                                                                                         stime INTEGER, 
12                                                                                                         atime INTEGER, 
13                                                                                                         etime INTEGER, 
14                                                                                                         sdate INTEGER, 
15                                                                                                         edate INTEGER, 
16                                                     timezone TEXT,
17                                                                                                         repeat_once INTEGER, 
18                                                                                                         repeat_every INTEGER, 
19                                                                                                         repeat_weekly INTEGER, 
20                                                                                                         snooze_enable INTEGER, 
21                                                                                                         snooze_min INTEGER, 
22                                                                                                         snooze_times INTEGER, 
23                                                                                                         count INTEGER, 
24                                                                                                         type INTEGER, 
25                                                                                                         tone TEXT, 
26                                                                                                         volume INTEGER, 
27                                                                                                         auto_power_on INTEGER   );'
28
29
30 if [ ${USER} = "root" ]
31 then
32 # Change file owner
33         #1.libraries
34         #2.executables  
35         #3.configurations
36         #4.images
37         #5.edje
38         #6.internatialize
39         #7.etc
40         #chown :5000 /opt/dbspace
41         chown :6001 /opt/dbspace/.alarm.db
42         chown :6001 /opt/dbspace/.alarm.db-journal      
43         #chown root:root /opt/dbspace/.alarm.db
44         #chown root:root /opt/dbspace/.alarm.db-journal 
45
46 fi
47 # Change file permissions
48         #1.libraries
49         #2.executables
50         #3.configurations
51         #4.images
52         #5.edje
53         #6.internatialize
54         #7.etc
55         #chmod 775 /opt/dbspace
56         chmod 660 /opt/dbspace/.alarm.db
57         chmod 660 /opt/dbspace/.alarm.db-journal
58         #chmod 600 /opt/dbspace/.alarm.db
59         #chmod 600 /opt/dbspace/.alarm.db-journal
60