feat: backup archive file

This commit is contained in:
zhangsz
2025-03-06 20:21:51 +08:00
parent e9c7f4fa2c
commit bf65bd4fc5
10 changed files with 135 additions and 0 deletions

10
backup/pkg/canal.service Executable file
View File

@@ -0,0 +1,10 @@
[Service]
Type=idle
ExecStart=/usr/local/bin/canal > /dev/null 2>&1 &
Restart=always
RestartSec=3
StandardOutput=null
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,50 @@
log:
level: info
mysqlDb:
addr: 192.168.1.211:3306
username: boss
password: mysqlboss
redisDb:
netType: unix
addr: /var/run/kvdb.sock
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
interval: 6
readTimout: 5
emsIp: 10.10.1.71
emsPort: 4999
username: manager
password: manager
connectHss: 'connect hlr -srvip 10.10.1.104 -passwd 123456'
connectAuc: 'connect auc -srvip 10.10.1.104 -passwd 123456'
connectVms: 'connect vms -srvip 10.10.1.104 -passwd 123456'
disconnectHss: 'disconnect hlr'
disconnectVms: 'disconnect vms'
ssEntryIdInCrm: 1049
bundleUsageNotify:
voice75Percent: false
data75Percent: true
sms75Percent: false

10
backup/pkg/control Executable file
View File

@@ -0,0 +1,10 @@
Package: canal
Version: 1.0.1-20240812
Section: net
Priority: optional
Architecture: amd64
Essential: no
Depends:
Conflicts: canal
Maintainer: CoreNet
Description: CoreNet Software

25
backup/pkg/make.deb Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
#cd ../build
test -d debian && rm -rf debian/* || mkdir -p debian
mkdir -p debian/DEBIAN
mkdir -p debian/usr/local/bin
mkdir -p debian/usr/local/etc/canal/default
#mkdir -p debian/usr/local/etc/canal/license
mkdir -p debian/lib/systemd/system
cp ../proxy debian/usr/local/bin/canal
cp -rf ./conf/* debian/usr/local/etc/canal/default
cp ./canal.service debian/lib/systemd/system
cp ./control debian/DEBIAN
cp ./prerm debian/DEBIAN
cp ./postinst debian/DEBIAN
fakeroot dpkg-deb --build debian
mv debian.deb debian/canal-1.0.1-ub22.deb
#mv debian.deb debian/canal-1.0.1.amd64.deb

7
backup/pkg/postinst Executable file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
test ! -f /usr/local/etc/canal/config.json && cp -rf /usr/local/etc/canal/default/* /usr/local/etc/canal
systemctl enable canal
exit 0

6
backup/pkg/prerm Executable file
View File

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