Whenever we want to run an Ethereum network, we usually need to execute a pair of EC (Execution Client) + Consensus client (CC).
# named like ethereum-sepolia.target
[Unit]
Description=Ethereum Sepolia Service
# This collection of apps should be started at boot time.
[Install]
WantedBy=multi-user.target
With this, we can group related service units and control those as a group rather than per service instance:
# In a file name like [email protected]
[Unit]
Description=%I Instance of App Web Service
PartOf=ethereum-sepolia.target
[Service]
ExecStart=/Command
Restart=on-failure
StandardOutput=journal
# Service definition for i.e prysm
# When systemctl enable is used, make this start when the App service starts
[Install]
WantedBy=ethereum-sepolia.target