PNF Registration to be sent after odu stack is up
[o-du/l2.git] / build / scripts / troubleshoot_netconf.sh
diff --git a/build/scripts/troubleshoot_netconf.sh b/build/scripts/troubleshoot_netconf.sh
new file mode 100755 (executable)
index 0000000..08e6805
--- /dev/null
@@ -0,0 +1,33 @@
+################################################################################
+#   Copyright (c) [2020-2021] [HCL Technologies Ltd.]                          #
+#                                                                              #
+#   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.                                             #
+################################################################################
+# This script is used to clean-up sysrepo databas
+#!/bin/bash
+
+CURRENT_DIR=$PWD
+ROOT_DIR=$CURRENT_DIR/../..
+
+if [ "$1" = "cleanup" ]; then
+   kill -9 `pidof netopeer2-server`
+   cd $ROOT_DIR/build/netconf/sysrepo/build/
+   make sr_clean
+   cd $ROOT_DIR/build/netconf/Netopeer2/build/
+   make install
+   cd $CURRENT_DIR
+fi
+
+################################################################################
+#                              End of file                                     #
+################################################################################