feat: add build restproxy to the input
This commit is contained in:
10
pkg/cproxy/DEBIAN/control
Executable file
10
pkg/cproxy/DEBIAN/control
Executable file
@@ -0,0 +1,10 @@
|
||||
Package: restproxy
|
||||
Version: 2403.1-YYYYMMDD
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Essential: no
|
||||
Depends:
|
||||
Conflicts: restproxy
|
||||
Maintainer: 4GC
|
||||
Description: 4GC REST Proxy Software
|
||||
7
pkg/cproxy/DEBIAN/postinst
Executable file
7
pkg/cproxy/DEBIAN/postinst
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
test ! -f /usr/local/restproxy/conf/rest_proxy.conf && cp -rf /usr/local/restproxy/conf/default/* /usr/local/restproxy/conf
|
||||
|
||||
systemctl enable restproxy
|
||||
|
||||
exit 0
|
||||
6
pkg/cproxy/DEBIAN/prerm
Executable file
6
pkg/cproxy/DEBIAN/prerm
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Commands to be run before uninstall of the package
|
||||
|
||||
systemctl disable restproxy
|
||||
|
||||
26
pkg/cproxy/conf/db_adapotr.cfg
Normal file
26
pkg/cproxy/conf/db_adapotr.cfg
Normal file
@@ -0,0 +1,26 @@
|
||||
[db0]
|
||||
enable=on
|
||||
role=master
|
||||
host_ip=192.168.1.211
|
||||
host_port=3306
|
||||
db_name=boss
|
||||
client_name=root
|
||||
client_pwd=123456
|
||||
|
||||
[db1]
|
||||
enable=on
|
||||
role=slave
|
||||
host_ip=192.168.1.211
|
||||
host_port=3306
|
||||
db_name=boss
|
||||
client_name=root
|
||||
client_pwd=123456
|
||||
|
||||
[db2]
|
||||
enable=on
|
||||
role=slave
|
||||
host_ip=192.168.1.211
|
||||
host_port=3306
|
||||
db_name=boss
|
||||
client_name=root
|
||||
client_pwd=123456
|
||||
1
pkg/cproxy/conf/dstn_entry.cfg
Normal file
1
pkg/cproxy/conf/dstn_entry.cfg
Normal file
@@ -0,0 +1 @@
|
||||
20
|
||||
43
pkg/cproxy/conf/pstn_client.cfg
Normal file
43
pkg/cproxy/conf/pstn_client.cfg
Normal file
@@ -0,0 +1,43 @@
|
||||
[server]
|
||||
local_ip=192.168.1.229
|
||||
local_port=4901
|
||||
pstn_ip=192.168.1.231
|
||||
pstn_port=22
|
||||
user_name=altouser
|
||||
password=a1t0U53r
|
||||
[MSAN-0]
|
||||
ip=10.10.1.214
|
||||
port=23
|
||||
user_name=manager
|
||||
password=ntms@n
|
||||
[MSAN-1]
|
||||
ip=10.10.1.215
|
||||
port=23
|
||||
user_name=manager
|
||||
password=ntms@n
|
||||
[Pairs-Slot]
|
||||
#PairGrou,MASN,Slot
|
||||
0,1,1
|
||||
1,1,2
|
||||
2,1,3
|
||||
3,1,4
|
||||
4,1,5
|
||||
5,1,6
|
||||
6,1,7
|
||||
7,1,8
|
||||
8,1,9
|
||||
9,1,10
|
||||
10,1,14
|
||||
11,1,15
|
||||
12,2,1
|
||||
13,2,2
|
||||
14,2,3
|
||||
15,2,4
|
||||
16,2,5
|
||||
17,2,6
|
||||
18,2,7
|
||||
19,2,8
|
||||
20,2,9
|
||||
21,2,10
|
||||
22,2,14
|
||||
23,2,15
|
||||
22
pkg/cproxy/conf/rest_proxy.conf
Executable file
22
pkg/cproxy/conf/rest_proxy.conf
Executable file
@@ -0,0 +1,22 @@
|
||||
#rest proxy local ip and port as server
|
||||
localIPPort=10.60.1.152:4951
|
||||
|
||||
#restfull query ip&port
|
||||
queryIPPort=10.60.1.38:8080
|
||||
#restfull vourcher recharge ip&port
|
||||
rechargeIPPort=10.60.1.37:9000
|
||||
|
||||
#user/passwrd
|
||||
username=external
|
||||
password=password
|
||||
|
||||
subsystem=Selfcare
|
||||
customerIP=10.60.1.37
|
||||
url_walletbalance=/rest-services/%s/xxx
|
||||
url_rechargevoucher=/rest-services/%s/yyy
|
||||
#test MSISDN
|
||||
test_msisdn=6924546778
|
||||
#test_msisdn=77922417981167
|
||||
test_pin=63555825498329
|
||||
|
||||
log=./log/log
|
||||
39
pkg/cproxy/conf/selfcare_proxy.conf
Normal file
39
pkg/cproxy/conf/selfcare_proxy.conf
Normal file
@@ -0,0 +1,39 @@
|
||||
udp_localIPPort=192.168.1.229:4900
|
||||
udp_ocsIPPort=192.168.1.229:4951
|
||||
http_localPort=8080
|
||||
#authcode url
|
||||
authcode_url=/authcode
|
||||
#query_userdata url
|
||||
query_userdata_url=/query_userdata
|
||||
#bundle_subs url
|
||||
bundle_subs_url=/bundle_subs
|
||||
#bundle_usage url
|
||||
bundle_usage_url=/bundle_usage
|
||||
#recharge url
|
||||
recharge_url=/recharge
|
||||
#transfer url
|
||||
transfer_url=/transfer
|
||||
#recharge_card url
|
||||
recharge_card_url=/recharge_card
|
||||
#check_balance url
|
||||
check_balance_url=/check_balance
|
||||
#query_balane url
|
||||
query_balane_url=/query_balane
|
||||
#open acount url
|
||||
create_account_url=/openPackage
|
||||
#update acount url
|
||||
update_subs_url=/updateSubs
|
||||
#delete acount url
|
||||
delete_subs_url=/deleteSubs
|
||||
#errcodes and their meanings
|
||||
errcode_map_message=[2001,success]
|
||||
errcode_map_message=[3001,command unsupported]
|
||||
errcode_map_message=[3010,unknown peer]
|
||||
errcode_map_message=[4001,invalid user status]
|
||||
errcode_map_message=[4008,dest user not allowed]
|
||||
errcode_map_message=[4012,credit limit]
|
||||
errcode_map_message=[5004,invalid parameter value]
|
||||
errcode_map_message=[5005,missing parameter]
|
||||
errcode_map_message=[5006,invalid recharge password]
|
||||
errcode_map_message=[5012,unable to comply]
|
||||
errcode_map_message=[5030,user unknown]
|
||||
15
pkg/cproxy/conf/smcli_client.cfg
Normal file
15
pkg/cproxy/conf/smcli_client.cfg
Normal file
@@ -0,0 +1,15 @@
|
||||
[EMS]
|
||||
ems0_ip=192.168.1.141
|
||||
ems0_port=4999
|
||||
user_name=manager
|
||||
password=manager
|
||||
connect_hss=connect hlr -srvip 192.168.1.219 -passwd 123456
|
||||
connect_auc=connect auc -srvip 192.168.1.219 -passwd 123456
|
||||
|
||||
[HSS]
|
||||
|
||||
[AUC]
|
||||
|
||||
[VMS]
|
||||
[Provision]
|
||||
enable
|
||||
11
pkg/cproxy/systemd/restproxy.service
Executable file
11
pkg/cproxy/systemd/restproxy.service
Executable file
@@ -0,0 +1,11 @@
|
||||
[Service]
|
||||
Type=idle
|
||||
WorkingDirectory=/usr/local/restproxy
|
||||
ExecStart=/usr/local/restproxy/restproxy -r 1 > /dev/null 2>&1 &
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
StandardOutput=null
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
10
pkg/goproxy/DEBIAN/control
Executable file
10
pkg/goproxy/DEBIAN/control
Executable file
@@ -0,0 +1,10 @@
|
||||
Package: restproxy
|
||||
Version: 2403.1-YYYYMMDD
|
||||
Section: net
|
||||
Priority: optional
|
||||
Architecture: amd64
|
||||
Essential: no
|
||||
Depends:
|
||||
Conflicts: restproxy
|
||||
Maintainer: 4GC
|
||||
Description: 4GC REST Proxy Software
|
||||
7
pkg/goproxy/DEBIAN/postinst
Executable file
7
pkg/goproxy/DEBIAN/postinst
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
test ! -f /usr/local/restproxy/conf/rest_proxy.conf && cp -rf /usr/local/restproxy/conf/default/* /usr/local/restproxy/conf
|
||||
|
||||
systemctl enable restproxy
|
||||
|
||||
exit 0
|
||||
6
pkg/goproxy/DEBIAN/prerm
Executable file
6
pkg/goproxy/DEBIAN/prerm
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Commands to be run before uninstall of the package
|
||||
|
||||
systemctl disable restproxy
|
||||
|
||||
38
pkg/goproxy/conf/config.yaml
Normal file
38
pkg/goproxy/conf/config.yaml
Normal file
@@ -0,0 +1,38 @@
|
||||
log:
|
||||
level: info
|
||||
mysqlDb:
|
||||
addr: 192.168.1.211:3306
|
||||
username: boss
|
||||
password: mysqlboss
|
||||
redisDb:
|
||||
netType: unix
|
||||
addr: /var/run/kvdb.sock
|
||||
##sentinelAddrs:
|
||||
## - 192.168.7.90:26379
|
||||
## - 192.168.4.61:26379
|
||||
telnetServer:
|
||||
addr: 192.168.7.90:4100
|
||||
rest:
|
||||
enabled: true
|
||||
httpAddr: 192.168.7.90:8080
|
||||
emsAddr: 192.168.7.92:4999
|
||||
locRzIp: 192.168.7.90
|
||||
locRzPort: 4900
|
||||
ocsRzIp: 192.168.7.90
|
||||
ocsRzPort: 4951
|
||||
enableNotification: true
|
||||
canalServer:
|
||||
enabled: true
|
||||
addr: 192.168.1.211:3306
|
||||
username: canal
|
||||
password: canal
|
||||
reinit: false
|
||||
flushBeforeInit: true
|
||||
standalone: true
|
||||
cronCfg:
|
||||
enabled: true
|
||||
clrExp: '0 20 5 1,11,21 * ?'
|
||||
ntfSms: '*/3 * * * * ?'
|
||||
provision:
|
||||
enabled: true
|
||||
ssEntryIdInCrm: 1049
|
||||
11
pkg/goproxy/systemd/restproxy.service
Executable file
11
pkg/goproxy/systemd/restproxy.service
Executable file
@@ -0,0 +1,11 @@
|
||||
[Service]
|
||||
Type=idle
|
||||
WorkingDirectory=/usr/local/restproxy
|
||||
ExecStart=/usr/local/restproxy/restproxy -r 1 > /dev/null 2>&1 &
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
StandardOutput=null
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Reference in New Issue
Block a user