3 # Copyright 2012 Samsung Electronics Co., Ltd
5 # Licensed under the Flora License, Version 1.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.tizenopensource.org/license
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 while [ ! -f "/tmp/.stop.provider" ]; do
22 # PROVIDER_HEAP_MONITOR_START=false
23 # PROVIDER_DISABLE_CALL_OPTION=false
24 # PROVIDER_METHOD="shm", "pixmap", "file" (default = "file")
25 BUFMGR_LOCK_TYPE="once" BUFMGR_MAP_CACHE="true" /usr/bin/data-provider-master
26 let RETRY_COUNT=$RETRY_COUNT+1
27 if [ $RETRY_COUNT -gt 5 ]; then
28 echo "EXCEED THE MAXIMUM RETRY COUNT: $RETRY_COUNT (max 5)"
32 rm /tmp/.stop.provider
37 rm /opt/usr/share/live_magazine/*
38 rm /opt/usr/share/live_magazine/reader/*
39 rm /opt/usr/share/live_magazine/log/*
40 rm /tmp/.stop.provider
48 echo "'ps' is not exists"
54 echo "'grep' is not exists"
60 echo "'awk' is not exists"
64 if [ ! -f "/usr/bin/data-provider-master" ]; then
65 echo "Data provider master is not installed correctly";
69 touch /tmp/.stop.provider
70 BIN_INODE=`stat -Lc "%i" /usr/bin/data-provider-master`
72 PID=`ps ax | grep 'data-provider-master' | awk '{print $1}'`
75 if [ ! -f "/proc/$I/exe" ]; then
79 INODE=`stat -Lc "%i" /proc/$I/exe 2>/dev/null`
80 if [ x"$BIN_INODE" == x"$INODE" ]; then
81 echo "Send TERM to $I"
82 kill $I # Try to terminate a master which is launched already
91 restart) stop; start;;