diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-05-01 16:51:56 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-05-01 16:52:57 +0200 |
commit | 35eb9d6c880ec4dd732b9cb4443f84cec2c2cd4e (patch) | |
tree | 5a8ef2ee612b8a5304036033e09f8e8ee5b92e95 /contrib/debian/bitcoind.service | |
parent | c5f7efe3312ffb63567d7a4d6653245c745a062f (diff) | |
parent | 2a87b1b07c5c4f8b9b34747c5f254c2ae1e824bf (diff) |
Merge #12769: Add systemd service to bitcoind in debian package
2a87b1b Add systemd service for bitcoind (ctp-tsteenholdt)
9085532 Sync contrib/debian from Matt Corallo's PPA (ctp-tsteenholdt)
Pull request description:
On suggestion from @TheBlueMatt I have updated `contrib/debian` files to include a systemd service in the `bitcoind` build. Tested and working on Ubuntu 16.04 and 17.10.
This fixes Issue #12758
Tree-SHA512: b6137fafee940c7410df1242c8716a87f47c5bc60eb8df3ad0184a50c2d67ef3f2728761c742670a0ad546ab6e7ad60472a721350cd6280b3bcbdc582e50ee07
Diffstat (limited to 'contrib/debian/bitcoind.service')
-rw-r--r-- | contrib/debian/bitcoind.service | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/contrib/debian/bitcoind.service b/contrib/debian/bitcoind.service new file mode 100644 index 0000000000..26c771f256 --- /dev/null +++ b/contrib/debian/bitcoind.service @@ -0,0 +1,45 @@ +# It is not recommended to modify this file in-place, because it will +# be overwritten during package upgrades. If you want to add further +# options or overwrite existing ones then use +# $ systemctl edit bitcoind.service +# See "man systemd.service" for details. + +# Note that almost all daemon options could be specified in +# /etc/bitcoin/bitcoin.conf + +[Unit] +Description=Bitcoin daemon +After=network.target + +[Service] +ExecStart=/usr/bin/bitcoind -daemon -datadir=/var/lib/bitcoin -conf=/etc/bitcoin/bitcoin.conf -pid=/run/bitcoind/bitcoind.pid +# Creates /run/bitcoind owned by bitcoin +RuntimeDirectory=bitcoind +User=bitcoin +Type=forking +PIDFile=/run/bitcoind/bitcoind.pid +Restart=on-failure + +# Hardening measures +#################### + +# Provide a private /tmp and /var/tmp. +PrivateTmp=true + +# Mount /usr, /boot/ and /etc read-only for the process. +ProtectSystem=full + +# 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. +# Commented out as it's not supported on Debian 8 or Ubuntu 16.04 LTS +#MemoryDenyWriteExecute=true + +[Install] +WantedBy=multi-user.target |