#!/bin/sh sqlite3 /opt/dbspace/.alarm.db 'PRAGMA journal_mode = PERSIST; create table if not exists alarm (id INTEGER PRIMARY KEY autoincrement, magic INTEGER, alarm_mgr_id INTEGER, enable INTEGER, missed INTEGER, author INTEGER, name TEXT, stime INTEGER, atime INTEGER, etime INTEGER, sdate INTEGER, edate INTEGER, timezone TEXT, repeat_once INTEGER, repeat_every INTEGER, repeat_weekly INTEGER, snooze_enable INTEGER, snooze_min INTEGER, snooze_times INTEGER, count INTEGER, type INTEGER, tone TEXT, volume INTEGER, auto_power_on INTEGER );' if [ ${USER} = "root" ] then # Change file owner #1.libraries #2.executables #3.configurations #4.images #5.edje #6.internatialize #7.etc #chown :5000 /opt/dbspace chown :6001 /opt/dbspace/.alarm.db chown :6001 /opt/dbspace/.alarm.db-journal #chown root:root /opt/dbspace/.alarm.db #chown root:root /opt/dbspace/.alarm.db-journal fi # Change file permissions #1.libraries #2.executables #3.configurations #4.images #5.edje #6.internatialize #7.etc #chmod 775 /opt/dbspace chmod 660 /opt/dbspace/.alarm.db chmod 660 /opt/dbspace/.alarm.db-journal #chmod 600 /opt/dbspace/.alarm.db #chmod 600 /opt/dbspace/.alarm.db-journal