remove hardcoded path for multiuser support
[platform/core/appfw/sppc.git] / packaging / init_push_DB.sh
1 #!/bin/sh
2
3 source /etc/tizen-platform.conf
4
5 mkdir -p $TZ_SYS_DB
6 sqlite3 $TZ_SYS_DB/.push.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
7 chown root:$TZ_SYS_USER_GROUP $TZ_SYS_DB/.push.db
8 chown root:$TZ_SYS_USER_GROUP $TZ_SYS_DB/.push.db-journal
9 chmod 660 $TZ_SYS_DB/.push.db
10 chmod 660 $TZ_SYS_DB/.push.db-journal
11
12 #chsmack -a 'push-service::db' /opt/dbspace/.push.db
13 #chsmack -a 'push-service::db' /opt/dbspace/.push.db-journal
14
15 users_gid=$(getent group $TZ_SYS_USER_GROUP | cut -f3 -d':')
16
17 _VER="1"
18 _DEV_TYPE="00000000"
19 _DEV_INFO="device.model=ssltest"
20 _IP_PV="gld.push.samsungosp.com"
21 _PORT_PV=5223
22 #ping interval {120,240,480,960,1920}
23 _PING_INT=480
24 _GRP="-g $users_gid"
25
26 vconftool set -t string file/private/push-bin/version ${_VER} ${_GRP} -f
27 vconftool set -t string file/private/push-bin/dev_type ${_DEV_TYPE} ${_GRP} -f
28 vconftool set -t string file/private/push-bin/dev_info ${_DEV_INFO} ${_GRP} -f
29 vconftool set -t string file/private/push-bin/ip_pv ${_IP_PV} ${_GRP} -f
30 vconftool set -t int    file/private/push-bin/port_pv ${_PORT_PV} ${_GRP} -f
31 vconftool set -t int    file/private/push-bin/ping_int ${_PING_INT} ${_GRP} -f
32 vconftool set -t string file/private/push-bin/devtk "" ${_GRP} -f
33 vconftool set -t string file/private/push-bin/ip_pri "" ${_GRP} -f
34 vconftool set -t int    file/private/push-bin/port_pri -1 ${_GRP} -f
35 vconftool set -t string file/private/push-bin/ip_sec "" ${_GRP} -f
36 vconftool set -t int    file/private/push-bin/port_sec -1 ${_GRP} -f