Skip to content
This repository was archived by the owner on Dec 10, 2022. It is now read-only.

Commit 7cbc63e

Browse files
committed
chore(deb): add scripts to build deb package
1 parent 073c851 commit 7cbc63e

File tree

4 files changed

+93
-0
lines changed

4 files changed

+93
-0
lines changed

Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,24 @@ categories = ["multimedia"]
1515
license = "MIT"
1616
edition = "2018"
1717

18+
19+
[package.metadata.deb]
20+
maintainer = "Roman Proskuryakov <[email protected]>"
21+
license-file = ["LICENSE"]
22+
depends = "$auto, systemd"
23+
extended-description = "A server application to run tox node written in pure Rust"
24+
section = "net"
25+
priority = "optional"
26+
assets = [
27+
["target/release/tox-node", "/usr/bin/", "755"],
28+
["README.md", "/usr/share/doc/tox-node/README", "644"],
29+
["dpkg/tox-node.service", "/lib/systemd/system/", "644"],
30+
["dpkg/config.yml", "/etc/tox-node/", "644"],
31+
]
32+
conf-files = ["/etc/tox-node/config.yml"]
33+
maintainer-scripts = "dpkg/info"
34+
35+
1836
[dependencies]
1937
chrono = "0.4"
2038
clap = "2.32"

dpkg/config.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
log-type: Syslog
2+
keys-file: /var/lib/tox-node/keys
3+
udp-address: 0.0.0.0:33445
4+
tcp-addresses:
5+
- 0.0.0.0:33445
6+
tcp-connections-limit: 8192
7+
lan-discovery: True
8+
threads: 1
9+
motd: "Hi from tox-rs! I'm up {{uptime}}. TCP: incoming {{tcp_packets_in}}, outgoing {{tcp_packets_out}}, UDP: incoming {{udp_packets_in}}, outgoing {{udp_packets_out}}"
10+
11+
12+
bootstrap-nodes:
13+
- pk: F404ABAA1C99A9D37D61AB54898F56793E1DEF8BD46B1038B9D822E8460FAB67
14+
addr: node.tox.biribiri.org:33445
15+
- pk: 8E7D0B859922EF569298B4D261A8CCB5FEA14FB91ED412A7603A585A25698832
16+
addr: 85.172.30.117:33445
17+
- pk: DA4E4ED4B697F2E9B000EEFE3A34B554ACD3F45F5C96EAEA2516DD7FF9AF7B43
18+
addr: 185.25.116.107:33445
19+
- pk: 1C5293AEF2114717547B39DA8EA6F1E331E5E358B35F9B6B5F19317911C5F976
20+
addr: tox.verdict.gg:33445
21+
- pk: AEC204B9A4501412D5F0BB67D9C81B5DB3EE6ADA64122D32A3E9B093D544327D
22+
addr: tox1.a68366.com:33445
23+
- pk: 2C289F9F37C20D09DA83565588BF496FAB3764853FA38141817A72E3F18ACA0B
24+
addr: 163.172.136.118:33445
25+
- pk: 02807CF4F8BB8FB390CC3794BDF1E8449E9A8392C5D3F2200019DA9F1E812E46
26+
addr: 78.46.73.141:33445
27+
- pk: 3F0A45A268367C1BEA652F258C85F4A66DA76BCAA667A49E770BCC4917AB6A25
28+
addr: tox.initramfs.io:33445
29+
- pk: 813C8F4187833EF0655B10F7752141A352248462A567529A38B6BBF73E979307
30+
addr: 46.229.52.198:33445
31+
- pk: 7E5668E0EE09E19F320AD47902419331FFEE147BB3606769CFBE921A2A2FD34C
32+
addr: 144.217.167.73:33445
33+
- pk: 10C00EB250C3233E343E2AEBA07115A5C28920E9C8D29492F6D00B29049EDC7E
34+
addr: tox.abilinski.com:33445
35+
- pk: 7467AFA626D3246343170B309BA5BDC975DF3924FC9D7A5917FBFA9F5CD5CD38
36+
addr: tmux.ru:33445
37+
- pk: 1B5A8AB25FFFB66620A531C4646B47F0F32B74C547B30AF8BD8266CA50A3AB59
38+
addr: 37.48.122.22:33445
39+
- pk: D527E5847F8330D628DAB1814F0A422F6DC9D0A300E6C357634EE2DA88C35463
40+
addr: tox.novg.net:33445
41+
- pk: 257744DBF57BE3E117FE05D145B5F806089428D4DCE4E3D0D50616AA16D9417E
42+
addr: 95.31.18.227:33445
43+
- pk: 2555763C8C460495B14157D234DD56B86300A2395554BCAE4621AC345B8C1B1B
44+
addr: 185.14.30.213:443
45+
- pk: BEF0CFB37AF874BD17B9A8F9FE64C75521DB95A37D33C5BDB00E9CF58659C04F
46+
addr: 198.199.98.108:33445
47+
- pk: A04F5FE1D006871588C8EC163676458C1EC75B20B4A147433D271E1E85DAF839
48+
addr: 52.53.185.100:33445
49+
- pk: 82EF82BA33445A1F91A7DB27189ECFC0C013E06E3DA71F588ED692BED625EC23
50+
addr: tox.kurnevsky.net:33445
51+
- pk: 8EF12E275BA9CD7D56625D4950F2058B06D5905D0650A1FE76AF18DB986DF760
52+
addr: tox.yikifish.com:33445
53+
- pk: EDBEF0BE30CE1978F6EE9E13C1D4133409908929CC8AD7F56C4AE865B15B3177
54+
addr: 52.27.228.84:33445

dpkg/info/postinst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#! /bin/sh
2+
3+
useradd --home-dir /var/lib/tox-node --create-home --system --shell /sbin/nologin --comment "Account to run Tox's DHT bootstrap daemon" --user-group tox-node
4+
chmod 700 /var/lib/tox-node

dpkg/tox-node.service

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[Unit]
2+
Description=A server application to run tox node written in pure Rust
3+
After=local-fs.target network.target
4+
5+
[Service]
6+
ExecStart=/usr/bin/tox-node config /etc/tox-node/config.yml
7+
Type=simple
8+
LimitNOFILE=16384
9+
StandardOutput=null
10+
StandardError=null
11+
Restart=always
12+
RestartSec=10
13+
User=tox-node
14+
Group=tox-node
15+
16+
[Install]
17+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)