-
Notifications
You must be signed in to change notification settings - Fork 9
/
bosRules.service
46 lines (40 loc) · 1.76 KB
/
bosRules.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# This service continuously runs in background subscribing to opening channel requests,
# and filtering opening request by applying rules and settings.
#
# Some examples are explained here:
# https://github.com/niteshbalusu11/BOS-Commands-Document#inbound-channel-rules
# and https://github.com/alexbosworth/balanceofsatoshis#inbound-channel-rules
#
# Explanation of settings below:
# - capacity of a requested channel >= 10M sats
# - CLEARNET: peer must have a clearnet address
# - NOT(OBSOLETE): channel has to be of type anchors
# - NOT(PUBLIC_KEY = 'x'): pubkey is not allowed to open channel to us
# - coop-close-address(es): cycle through given addresses and add them as coop-close address to opening channels
# etc/systemd/system/bos-rules.service
[Unit]
Description=Bos Inbound Rules daemon
After=lnd.service
[Service]
ExecStart=/home/bos/.npm-global/bin/bos inbound-channel-rules \
--rule "CAPACITY >= 10*M" \
--rule "CLEARNET" \
--rule "NOT(OBSOLETE)" \
--rule "NOT(PUBLIC_KEY = '02...pubkey_of_peer_not_allowed')" \
--coop-close-address="bc1qx1" \
--coop-close-address="bc1qx2" \
--coop-close-address="bc1qx3" \
--coop-close-address="bc1xq4" \
--coop-close-address="bc1qx5" \
--coop-close-address="bc1qx6"
Restart=always
TimeoutSec=120
RestartSec=30
User=bos
Group=bos
PrivateTmp=true
ProtectSystem=full
NoNewPrivileges=true
PrivateDevices=true
[Install]
WantedBy=multi-user.target