2 if [ ! -d /opt/dbspace ]
7 if [ ! -f /opt/dbspace/.account.db ]
8 rm -rf /opt/dbspace/.account.db*
10 sqlite3 /opt/dbspace/.account.db 'PRAGMA journal_mode = PERSIST;
11 CREATE TABLE if not exists account (_id INTEGER PRIMARY KEY AUTOINCREMENT, user_name TEXT, email_address TEXT,
12 display_name TEXT, icon_path TEXT, source TEXT, package_name TEXT, access_token TEXT, domain_name TEXT,
13 auth_type INTEGER, secret INTEGER, txt_custom0 TEXT, txt_custom1 TEXT, txt_custom2 TEXT, txt_custom3 TEXT, txt_custom4 TEXT,
14 int_custom0 INTEGER, int_custom1 INTEGER, int_custom2 INTEGER, int_custom3 INTEGER, int_custom4 INTEGER);
16 CREATE TABLE if not exists capability (_id INTEGER PRIMARY KEY AUTOINCREMENT, key INTEGER, value INTEGER, package_name TEXT, user_name TEXT, account_id INTEGER);'
20 if [ ${USER} == "root" ]
22 if [ -f /opt/dbspace/.account.db ]
24 chown 5000:5000 /opt/dbspace/.account.db
27 if [ -f /opt/dbspace/.account.db-journal ]
29 chown 5000:5000 /opt/dbspace/.account.db-journal
33 if [ -f /opt/dbspace/.account.db ]
35 chmod 660 /opt/dbspace/.account.db
38 if [ -f /opt/dbspace/.account.db-journal ]
40 chmod 660 /opt/dbspace/.account.db-journal