Bitcoin

bitcoin core – For some reason Bitcoind does not start as a system service

There is a file bitcoind.service in /etc/systemd/system with the following content:


(Unit)
Description=Bitcoin daemon
After=network.target

(Service)
ExecStart=/media/user/2TB/.bitcoin/bitcoind-start.sh

# Process management
####################

Type=forking
PIDFile=/media/user/2TB/.bitcoind/bitcoind.pid
Restart=on-failure

# Directory creation and permissions
####################################

User=user
Group=user


# Hardening measures
####################

PrivateTmp=true

PrivateDevices=true

MemoryDenyWriteExecute=true

(Install)
WantedBy=multi-user.target

I also have a shell script with the following content and execute permissions: -rwxr-xr-x 1 user user :


#!/binbash

set -e

sleep 15

echo "Starting bitcoind with script..."

bitcoind --daemon --server -pid=/media/user/2TB/.bitcoin/bitcoind.pid

echo "Start bitcoind with script completed!"

The service does not start and throws the following error:

user@raspberrypi:~ $ systemctl status bitcoind.service

    × bitcoind.service - Bitcoin daemon
         Loaded: loaded (/etc/systemd/system/bitcoind.service; enabled; preset: enabled)
         Active: failed (Result: exit-code) since Mon 2024-04-01 12:57:32 BST; 13s ago
        Process: 5171 ExecStart=/media/user/2TB/.bitcoin/bitcoind-start.sh (code=exited, status=203/EXEC)
            CPU: 15ms

Any help or ideas as to why this is happening would be greatly appreciated!

glass

Related Articles

Back to top button