Update script path
[platform/core/multimedia/media-server.git] / 30_media-server-add.post
1 #!/bin/sh -e
2 PATH=/bin:/usr/bin:/sbin:/usr/sbin
3
4 NEW_USER=$1
5 export `tzplatform-get --user $NEW_USER TZ_USER_SHARE`
6 export `tzplatform-get --user $NEW_USER TZ_USER_DB`
7
8 /usr/bin/touch $TZ_USER_DB/.media.db
9 /usr/bin/chown multimedia_fw:multimedia_fw $TZ_USER_DB/.media.db
10 /usr/bin/chmod 2644 $TZ_USER_DB/.media.db
11
12 /usr/bin/mkdir -p $TZ_USER_SHARE/media/.thumb/phone
13 /usr/bin/mkdir -p $TZ_USER_SHARE/media/.thumb/mmc
14 /usr/bin/chown -R multimedia_fw:multimedia_fw $TZ_USER_SHARE/media
15 /usr/bin/chsmack -a 'User::App::Shared' -t
16 /usr/bin/chmod 2775 $TZ_USER_SHARE/media
17 /usr/bin/chmod -R 2777 $TZ_USER_SHARE/media/.thumb
18 /usr/bin/find $NEW_USER $TZ_USER_SHARE/media/.thumb -type d -exec /usr/bin/chsmack -a 'User::App::Shared' -t {} +