Wednesday, April 17, 2019

startup - How to start /usr/bin/bitcoind on boot?

I'm trying to get /usr/bin/bitcoind to start on boot but without success.




I have this script on /etc/init/bitcoind.conf



description "bitcoind"

start on filesystem
stop on runlevel [!2345]
oom never
expect daemon
respawn
respawn limit 10 60 # 10 times in 60 seconds


script
user=andre
home=/home/$user
cmd=/usr/bin/bitcoind
pidfile=$home/.bitcoin/bitcoind.pid
# Don't change anything below here unless you know what you're doing
[[ -e $pidfile && ! -d "/proc/$(cat $pidfile)" ]] && rm $pidfile
[[ -e $pidfile && "$(cat /proc/$(cat $pidfile)/cmdline)" != $cmd* ]] && rm $pidfile
exec start-stop-daemon --start -c $user --chdir $home --pidfile $pidfile --starta $cmd -b -m

end script


After creating this script I've run the command: sudo initctl reload-configuration



When I restart Ubuntu the "bitcoind" does not start. I only can start "bitcoind" running manually the command:



sudo start bitcoind



Any clues on how to start "bitcoind" on boot?

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...