Modify thumbnail store 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 if [ ! -e /system-update ]
9 then
10 /usr/bin/touch $TZ_USER_DB/.media.db
11 /usr/bin/chown multimedia_fw:multimedia_fw $TZ_USER_DB/.media.db
12 /usr/bin/chmod 0644 $TZ_USER_DB/.media.db
13 /usr/bin/chsmack -a 'User::Home' $TZ_USER_DB/.media.db
14
15 /usr/bin/mkdir -p $TZ_USER_SHARE/media/.thumb
16 /usr/bin/chown -R multimedia_fw:multimedia_fw $TZ_USER_SHARE/media
17 /usr/bin/chsmack -a 'User::App::Shared' -t $TZ_USER_SHARE/media
18 /usr/bin/chmod 0775 $TZ_USER_SHARE/media
19 /usr/bin/chmod -R 0777 $TZ_USER_SHARE/media/.thumb
20 /usr/bin/find $NEW_USER $TZ_USER_SHARE/media/.thumb -type d -exec /usr/bin/chsmack -a 'User::App::Shared' -t {} +
21 fi