feat: add build restproxy to the input

This commit is contained in:
zhangsz
2025-03-06 20:11:02 +08:00
parent e6b570488c
commit e9c7f4fa2c
16 changed files with 379 additions and 17 deletions

10
pkg/goproxy/DEBIAN/control Executable file
View 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
View 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
View File

@@ -0,0 +1,6 @@
#!/bin/bash
# Commands to be run before uninstall of the package
systemctl disable restproxy

View 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

View 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