Skip to content

Commit

Permalink
add service file for pigeond (#36)
Browse files Browse the repository at this point in the history
* add service file for pigeond

* add Environment variables

* remove sudo

* enrich comments

* use vraibles and remove comments and sudo

* move out of block

Co-authored-by: Aditya Verma <aditya.verma@flipkart.com>
  • Loading branch information
aditya-manit and AdityaVermaFlipkart authored Jul 7, 2022
1 parent df366d1 commit 7a68e64
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,34 @@ export ETH_SIGNING_KEY=<Your ETH SIGNING KEY>
pigeon start
```

- Remember to run pigeon as a systemd Service! If you have a good systemd service implementation for Ubuntu, please make a PR on this README and we will add it.

#### Using systemd service
Create service file

```shell script
tee <<EOF >/dev/null /etc/systemd/system/pigeond.service
[Unit]
Description=Pigeon daemon
After=network-online.target
[Service]
Environment="PALOMA_KEYRING_PASS=$PALOMA_KEYRING_PASS"
Environment="ETH_RPC_URL=$ETH_RPC_URL"
Environment="ETH_PASSWORD=$ETH_PASSWORD"
Environment="ETH_SIGNING_KEY=$ETH_SIGNING_KEY"
User=$USER
ExecStart=/usr/local/bin/pigeon start
Restart=on-failure
RestartSec=3
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
EOF

systemctl restart pigeond
# check logs
journalctl -u pigeond.service -f -n 100
```

### Definitions and Descriptions of Pigeons Variables
- for paloma key:
Expand Down

0 comments on commit 7a68e64

Please sign in to comment.