Add systemd setup
This commit is contained in:
10
systemd/chaind-eth-queue@.service
Normal file
10
systemd/chaind-eth-queue@.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Chainqueue transaction dispatch interface
|
||||
Requires=chaind-eth-sync@.service
|
||||
After=chaind-eth-sync@.service
|
||||
|
||||
[Service]
|
||||
Environment="SESSION_ID=%i"
|
||||
Environment="SESSION_RUNTIME_DIR=/run/user/%U/chaind/eth"
|
||||
ExecStart=%h/.local/bin/chaind-eth-server -v --session-id %i
|
||||
Restart=on-failure
|
||||
6
systemd/chaind-eth-ready.sh
Normal file
6
systemd/chaind-eth-ready.sh
Normal file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
>&2 echo "waiting for socket at $@ to become ready"
|
||||
while ! test -S $@; do
|
||||
sleep 1s
|
||||
done
|
||||
8
systemd/chaind-eth-sync@.service
Normal file
8
systemd/chaind-eth-sync@.service
Normal file
@@ -0,0 +1,8 @@
|
||||
[Unit]
|
||||
Description=Ethereum chaind syncer
|
||||
|
||||
[Service]
|
||||
Environment="SESSION_ID=%i"
|
||||
Environment="SESSION_RUNTIME_DIR=/run/user/%U/chaind/eth"
|
||||
ExecStart=%h/.local/bin/chaind-eth-syncer -v --session-id %i --skip-history
|
||||
Restart=on-failure
|
||||
10
systemd/chaind-eth@.service
Normal file
10
systemd/chaind-eth@.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Chaind socket activation
|
||||
Requires=chaind-eth-queue@.service
|
||||
After=chaind-eth-queue@.service
|
||||
|
||||
[Service]
|
||||
Environment="SESSION_RUNTIME_DIR=/run/user/%U/chaind/eth/%i"
|
||||
ExecStartPre=/bin/bash /home/lash/.config/systemd/user/chaind-eth-ready.sh /run/user/%U/chaind/eth/%i/chaind.sock
|
||||
ExecStart=/usr/lib/systemd/systemd-socket-proxyd /run/user/%U/chaind/eth/%i/chaind.sock
|
||||
Restart=on-failure
|
||||
9
systemd/chaind-eth@.socket
Normal file
9
systemd/chaind-eth@.socket
Normal file
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Socket activation for
|
||||
|
||||
[Socket]
|
||||
ListenStream=63600
|
||||
Accept=no
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
2
systemd/environment.d/01-chaind-eth.conf
Normal file
2
systemd/environment.d/01-chaind-eth.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
SESSION_CHAIN_SPEC=evm:ethereum:1
|
||||
RPC_ENDPOINT=http://localhost:8545
|
||||
Reference in New Issue
Block a user