forked from free5gc/free5gc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
force_kill.sh
executable file
·23 lines (20 loc) · 911 Bytes
/
force_kill.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
NF_LIST="nrf amf smf udr pcf udm nssf ausf n3iwf upf chf"
for NF in ${NF_LIST}; do
sudo killall -9 ${NF}
done
sudo killall tcpdump
sudo ip link del upfgtp
sudo ip link del ipsec0
XFRMI_LIST=($(ip link | grep xfrmi | awk -F'[:,@]' '{print $2}'))
for XFRMI_IF in "${XFRMI_LIST[@]}"
do
sudo ip link del $XFRMI_IF
done
sudo rm /dev/mqueue/*
sudo rm -f /tmp/free5gc_unix_sock
sudo rm -f cert/*_*
sudo rm -f test/cert/*_*
sudo rm -f /tmp/config.json # CHF ChargingGatway FTP config
mongo --eval "db.NfProfile.drop();db.applicationData.influenceData.subsToNotify.drop();db.applicationData.subsToNotify.drop();db.policyData.subsToNotify.drop();db.exposureData.subsToNotify.drop()" free5gc
mongosh --eval "db.NfProfile.drop();db.applicationData.influenceData.subsToNotify.drop();db.applicationData.subsToNotify.drop();db.policyData.subsToNotify.drop();db.exposureData.subsToNotify.drop()" free5gc