blob: fd44b74fbfda7f2295351faf49e5c381405240d5 [file] [log] [blame]
Thiyagarajan Subramani3e8bfd92021-04-26 15:07:14 +05301#!/bin/bash
2
3#Copyright 2018-present Open Networking Foundation
4#
5#Licensed under the Apache License, Version 2.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
8#
9#http://www.apache.org/licenses/LICENSE-2.0
10#
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.
16
17# kill CLI applications
18echo "kill running time application"
19[ -n "`pidof openolt`" ] && service openolt stop
20[ -n "`pidof openolt`" ] && killall openolt
21[ -n "`pidof dev_mgmt_daemon`" ] && service dev_mgmt_daemon stop
22[ -n "`pidof dev_mgmt_daemon`" ] && killall dev_mgmt_daemon
23[ -n "`pidof bcm.user`" ] && killall bcm.user
24[ -n "`pidof dev_mgmt_attach`" ] && killall dev_mgmt_attach
25[ -n "`pidof embedded_console`" ] && killall embedded_console
26[ -n "`pidof example_user_appl`" ] && killall example_user_appl
27
28rm -f /tmp/root_dev_mgmt_pid /tmp/root_dev_mgmt_init_done
29sleep 3
30
31if [ -d /opt/bcm68650 ]; then
32 bash /opt/bcm68650/svk_init.sh -clean
33 sleep 3
34fi
35
36rm -rf /tmp/bcm68650_svk_init/
37
38rm -rf /opt/bcm68650
39rm -rf /opt/openolt
40rm -rf /broadcom
41
42sed -i '\/rm -rf \/tmp\/bcm68650_svk_init/d' /etc/rc.local
43sed -i '\/nohup bash \/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog &/d' /etc/rc.local
44
45rm -rf /run/bcm68650
46rm -rf /usr/local/lib/libz.so.1
47rm -rf /usr/local/lib/libbal_host_api.so
48rm -rf /usr/local/lib/libstdc++.so.6
49rm -f /etc/init.d/openolt
50rm -f /etc/init.d/dev_mgmt_daemon
51rm -f /etc/logrotate.d/openolt