smf_conf.sh 1.38 KB
Newer Older
1
# prompt has been removed for easier Ctrl+C Ctrl+V
2
# please update the following information according to your configuration
3
4
5
6
7
8
9
10
11
12
13

INSTANCE=1
PREFIX='/usr/local/etc/oai'
sudo mkdir -m 0777 -p $PREFIX
cp ../../etc/smf.conf  $PREFIX

declare -A SMF_CONF

SMF_CONF[@INSTANCE@]=$INSTANCE
SMF_CONF[@PREFIX@]=$PREFIX
SMF_CONF[@PID_DIRECTORY@]='/var/run'
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
14

15
16
SMF_CONF[@SMF_INTERFACE_NAME_FOR_N4@]='wlo1'
SMF_CONF[@SMF_INTERFACE_NAME_FOR_SBI@]='wlo1'
17
18

SMF_CONF[@SMF_INTERFACE_PORT_FOR_SBI@]='80'
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
19
SMF_CONF[@SMF_INTERFACE_HTTP2_PORT_FOR_SBI@]='9090'
20
SMF_CONF[@SMF_API_VERSION@]='v1'
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
21

22
23
24
SMF_CONF[@REGISTER_NRF@]='no'
SMF_CONF[@DISCOVER_UPF@]='no'

25
SMF_CONF[@UDM_IPV4_ADDRESS@]='172.16.1.103'
26
SMF_CONF[@UDM_PORT@]='80'
27
SMF_CONF[@UDM_API_VERSION@]='v2'
28
SMF_CONF[@UDM_FQDN@]='localhost'
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
29

30
SMF_CONF[@AMF_IPV4_ADDRESS@]='192.168.122.183'
31
SMF_CONF[@AMF_PORT@]='80'
32
SMF_CONF[@AMF_API_VERSION@]='v1'
33
SMF_CONF[@AMF_FQDN@]='localhost'
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
34

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
35
SMF_CONF[@UPF_IPV4_ADDRESS@]='192.168.12.245'
36
SMF_CONF[@UPF_FQDN@]='localhost'
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
37

Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
38
39
40
SMF_CONF[@NRF_IPV4_ADDRESS@]='192.168.1.23'
SMF_CONF[@NRF_PORT@]='8080'
SMF_CONF[@NRF_API_VERSION@]='v1'
41
SMF_CONF[@NRF_FQDN@]='localhost'
Tien-Thinh Nguyen's avatar
Tien-Thinh Nguyen committed
42
 
43
44
45
46
47
48
49
SMF_CONF[@DEFAULT_DNS_IPV4_ADDRESS@]='8.8.8.8'
SMF_CONF[@DEFAULT_DNS_SEC_IPV4_ADDRESS@]='4.4.4.4'

for K in "${!SMF_CONF[@]}"; do 
  egrep -lRZ "$K" $PREFIX | xargs -0 -l sed -i -e "s|$K|${SMF_CONF[$K]}|g"
  ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${SMF_CONF[$K]}"
done