4737f588b5a2b871efcdad176f5f42eb3f6dc416
[o-du/l2.git] / build / scripts / cu_script.sh
1 ################################################################################
2 #   Copyright (c) [2017-2019] [Radisys]
3 #   #
4 #                                                                              #
5 #   Licensed under the Apache License, Version 2.0 (the "License");
6 #   #
7 #   you may not use this file except in compliance with the License.
8 #   #
9 #   You may obtain a copy of the License at
10 #   #
11 #                                                                              #
12 #       http://www.apache.org/licenses/LICENSE-2.0
13 #       #
14 #                                                                              #
15 #   Unless required by applicable law or agreed to in writing, software
16 #   #
17 #   distributed under the License is distributed on an "AS IS" BASIS,
18 #   #
19 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
20 #   implied.   #
21 #   See the License for the specific language governing permissions
22 #   and        #
23 #   limitations under the License.
24 #   #
25 ################################################################################
26
27 #!/bin/sh
28
29 ROOT_DIR=$PWD
30 d=`date +%Y_%m_%d_%I_%M_%S`
31
32 touch  $ROOT_DIR/"log_cu_stub_$d.txt"
33 chmod -c 777 $ROOT_DIR/"log_cu_stub_$d.txt"
34 touch /etc/rsyslog.d/rsyslog_loginauth.conf
35 cp /dev/null /etc/rsyslog.d/rsyslog_loginauth.conf
36 echo "if \$programname == \"CU_STUB\" then" >> \
37 /etc/rsyslog.d/rsyslog_loginauth.conf
38 echo "$ROOT_DIR/../cu_stub/log_cu_stub_$d.txt" >> \
39 /etc/rsyslog.d/rsyslog_loginauth.conf
40 systemctl restart rsyslog
41
42
43 #**********************************************************************
44 #         End of file
45 #**********************************************************************