Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save echennells/6d270d85ae687e1201dcaf54d7918174 to your computer and use it in GitHub Desktop.
Save echennells/6d270d85ae687e1201dcaf54d7918174 to your computer and use it in GitHub Desktop.
[Unit]
Description=Litd daemon
After=bitcoind.service
Wants=bitcoind.service
[Service]
ExecStart=/home/ubuntu/go/bin/litd
# Process management
####################
PIDFile=/run/bitcoind/litd.pid
Type=simple
KillMode=process
TimeoutSec=180
Restart=always
RestartSec=60
# Directory creation and permissions
####################################
# Run as ubuntu:ubuntu
User=ubuntu
Group=ubuntu
# Hardening measures
####################
# Provide a private /tmp and /var/tmp.
PrivateTmp=true
# Disallow the process and all of its children to gain
# new privileges through execve().
NoNewPrivileges=true
# Use a new /dev namespace only populated with API pseudo devices
# such as /dev/null, /dev/zero and /dev/random.
PrivateDevices=true
# Deny the creation of writable and executable memory mappings.
MemoryDenyWriteExecute=true
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment