fc8b28557c4b65b352c95ef259c17366b989d37e
[o-du/l2.git] / build / scripts / odu_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/../odu/"log_odu_$d.txt"
33 chmod -c 777 $ROOT_DIR/../odu/"log_odu_$d.txt"
34 echo "if \$programname == \"ODU\" then" >> \
35 /etc/rsyslog.d/rsyslog_loginauth.conf
36 echo "$ROOT_DIR/../odu/log_odu_$d.txt" >> \
37 /etc/rsyslog.d/rsyslog_loginauth.conf
38 echo $ROOT_DIR
39 systemctl restart rsyslog
40
41
42 #**********************************************************************
43 #    End of file
44 #**********************************************************************