This repository has been archived by the owner on Jan 26, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
dcm.service
71 lines (60 loc) · 2.02 KB
/
dcm.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/sh
##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2016 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##########################################################################
#
. /etc/include.properties
. /etc/device.properties
source /lib/rdk/getpartnerid.sh
partnerId="$(getPartnerId)"
if [ -f /etc/telemetry2_0.properties ]; then
. /etc/telemetry2_0.properties
fi
local=0
#Adding support for override for dcm.properties file in non-prod builds
if [ "$BUILD_TYPE" != "prod" ] && [ -f $PERSISTENT_PATH/dcm.properties ]; then
. $PERSISTENT_PATH/dcm.properties
local=1
else
. /etc/dcm.properties
fi
t2Log() {
timestamp=`date +%Y-%b-%d_%H-%M-%S`
echo "$timestamp $*" >> $T2_0_LOGFILE
}
if [ $local -eq 0 ]
then
url_get="$(dmcli eRT getv Device.DeviceInfo.X_RDKCENTRAL-COM_Syndication.XconfURL | grep string | cut -d":" -f3- | cut -d" " -f2- | tr -d ' ')"
if [ "$url_get" != "" ]
then
DCM_LOG_SERVER_URL="${url_get}/loguploader/getSettings"
else
if [ "$partnerId" = "sky-uk" ]
then
DCM_LOG_SERVER_URL="$DCM_LOG_SERVER_URL_EU"
fi
fi
else
if [ "$partnerId" = "sky-uk" ]
then
DCM_LOG_SERVER_URL="$DCM_LOG_SERVER_URL_EU"
fi
fi
t2Log "Starting /lib/rdk/DCMscript.sh."
echo "Starting /lib/rdk/DCMscript.sh." >> $DCM_LOG_FILE
sh /lib/rdk/DCMscript.sh $DCM_LOG_SERVER $DCM_LOG_SERVER_URL $LOG_SERVER 0 1