Thiyagarajan Subramani | 3e8bfd9 | 2021-04-26 15:07:14 +0530 | [diff] [blame] | 1 | #!/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 |
| 18 | echo "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 | |
| 28 | rm -f /tmp/root_dev_mgmt_pid /tmp/root_dev_mgmt_init_done |
| 29 | sleep 3 |
| 30 | |
| 31 | if [ -d /opt/bcm68650 ]; then |
| 32 | bash /opt/bcm68650/svk_init.sh -clean |
| 33 | sleep 3 |
| 34 | fi |
| 35 | |
| 36 | rm -rf /tmp/bcm68650_svk_init/ |
| 37 | |
| 38 | rm -rf /opt/bcm68650 |
| 39 | rm -rf /opt/openolt |
| 40 | rm -rf /broadcom |
| 41 | |
| 42 | sed -i '\/rm -rf \/tmp\/bcm68650_svk_init/d' /etc/rc.local |
| 43 | sed -i '\/nohup bash \/opt\/openolt\/openolt_dev_mgmt_daemon_process_watchdog &/d' /etc/rc.local |
| 44 | |
| 45 | rm -rf /run/bcm68650 |
| 46 | rm -rf /usr/local/lib/libz.so.1 |
| 47 | rm -rf /usr/local/lib/libbal_host_api.so |
| 48 | rm -rf /usr/local/lib/libstdc++.so.6 |
| 49 | rm -f /etc/init.d/openolt |
| 50 | rm -f /etc/init.d/dev_mgmt_daemon |
| 51 | rm -f /etc/logrotate.d/openolt |