update inif file content

This commit is contained in:
Michel van Kessel
2020-12-20 13:04:46 +01:00
parent 8f4c2993d0
commit 97a181a5ad
5 changed files with 54 additions and 55 deletions

View File

@@ -1,16 +1,16 @@
description "Bitcoin Core Daemon"
description "Blackcoin More Daemon"
start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
env BITCOIND_BIN="/usr/bin/bitcoind"
env BITCOIND_USER="bitcoin"
env BITCOIND_GROUP="bitcoin"
env BITCOIND_PIDDIR="/var/run/bitcoind"
env BITCOIND_BIN="/usr/bin/blackmored"
env BITCOIND_USER="blackmore"
env BITCOIND_GROUP="blackmore"
env BITCOIND_PIDDIR="/var/run/blackmored"
# upstart can't handle variables constructed with other variables
env BITCOIND_PIDFILE="/var/run/bitcoind/bitcoind.pid"
env BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf"
env BITCOIND_DATADIR="/var/lib/bitcoind"
env BITCOIND_PIDFILE="/var/run/blackmored/blackmored.pid"
env BITCOIND_CONFIGFILE="/etc/blackmore/blackmore.conf"
env BITCOIND_DATADIR="/var/lib/blackmored"
expect fork
@@ -20,12 +20,12 @@ kill timeout 60
pre-start script
# this will catch non-existent config files
# bitcoind will check and exit with this very warning, but it can do so
# blackmored will check and exit with this very warning, but it can do so
# long after forking, leaving upstart to think everything started fine.
# since this is a commonly encountered case on install, just check and
# warn here.
if ! grep -qs '^rpcpassword=' "$BITCOIND_CONFIGFILE" ; then
echo "ERROR: You must set a secure rpcpassword to run bitcoind."
echo "ERROR: You must set a secure rpcpassword to run blackmored."
echo "The setting must appear in $BITCOIND_CONFIGFILE"
echo
echo "This password is security critical to securing wallets "
@@ -38,8 +38,8 @@ pre-start script
echo "It is also recommended that you also set alertnotify so you are "
echo "notified of problems:"
echo
echo "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
"admin@foo.com"
echo "ie: alertnotify=echo %%s | mail -s \"Blackcoin More Alert\"" \
"team@blackcoin.org"
echo
exit 1
fi

View File

@@ -1,32 +1,32 @@
#!/bin/bash
#
# bitcoind The bitcoin core server.
# blackmored The blackcoin more server.
#
#
# chkconfig: 345 80 20
# description: bitcoind
# processname: bitcoind
# description: blackmored
# processname: blackmored
#
# Source function library.
. /etc/init.d/functions
# you can override defaults in /etc/sysconfig/bitcoind, see below
if [ -f /etc/sysconfig/bitcoind ]; then
. /etc/sysconfig/bitcoind
# you can override defaults in /etc/sysconfig/blackmored, see below
if [ -f /etc/sysconfig/blackmored ]; then
. /etc/sysconfig/blackmored
fi
RETVAL=0
prog=bitcoind
# you can override the lockfile via BITCOIND_LOCKFILE in /etc/sysconfig/bitcoind
lockfile=${BITCOIND_LOCKFILE-/var/lock/subsys/bitcoind}
prog=blackmored
# you can override the lockfile via BITCOIND_LOCKFILE in /etc/sysconfig/blackmored
lockfile=${BITCOIND_LOCKFILE-/var/lock/subsys/blackmored}
# bitcoind defaults to /usr/bin/bitcoind, override with BITCOIND_BIN
bitcoind=${BITCOIND_BIN-/usr/bin/bitcoind}
# blackmored defaults to /usr/bin/blackmored, override with BITCOIND_BIN
blackmored=${BITCOIND_BIN-/usr/bin/blackmored}
# bitcoind opts default to -disablewallet, override with BITCOIND_OPTS
bitcoind_opts=${BITCOIND_OPTS--disablewallet}
# blackmored opts default to -disablewallet, override with BITCOIND_OPTS
blackmored_opts=${BITCOIND_OPTS--disablewallet}
start() {
echo -n $"Starting $prog: "

View File

@@ -2,26 +2,26 @@
# backward compatibility for existing gentoo layout
#
if [ -d "/var/lib/bitcoin/.bitcoin" ]; then
BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoin/.bitcoin"
if [ -d "/var/lib/blackmore/.blackmore" ]; then
BITCOIND_DEFAULT_DATADIR="/var/lib/blackmore/.blackmore"
else
BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoind"
BITCOIND_DEFAULT_DATADIR="/var/lib/blackmored"
fi
BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/bitcoin/bitcoin.conf}
BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/bitcoind}
BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/bitcoind.pid}
BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/blackmore/blackmore.conf}
BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/blackmored}
BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/blackmored.pid}
BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}}
BITCOIND_USER=${BITCOIND_USER:-${BITCOIN_USER:-bitcoin}}
BITCOIND_GROUP=${BITCOIND_GROUP:-bitcoin}
BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/bitcoind}
BITCOIND_USER=${BITCOIND_USER:-${BITCOIN_USER:-blackmore}}
BITCOIND_GROUP=${BITCOIND_GROUP:-blackmore}
BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/blackmored}
BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}}
BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}"
name="Bitcoin Core Daemon"
description="Bitcoin cryptocurrency P2P network daemon"
name="Blackcoin More Daemon"
description="Blackcoin cryptocurrency P2P network daemon"
command="/usr/bin/bitcoind"
command="/usr/bin/blackmored"
command_args="-pid=\"${BITCOIND_PIDFILE}\" \
-conf=\"${BITCOIND_CONFIGFILE}\" \
-datadir=\"${BITCOIND_DATADIR}\" \
@@ -71,7 +71,7 @@ checkconfig()
{
if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then
eerror ""
eerror "ERROR: You must set a secure rpcpassword to run bitcoind."
eerror "ERROR: You must set a secure rpcpassword to run blackmored."
eerror "The setting must appear in ${BITCOIND_CONFIGFILE}"
eerror ""
eerror "This password is security critical to securing wallets "
@@ -84,8 +84,8 @@ checkconfig()
eerror "It is also recommended that you also set alertnotify so you are "
eerror "notified of problems:"
eerror ""
eerror "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \
"admin@foo.com"
eerror "ie: alertnotify=echo %%s | mail -s \"Blackcoin More Alert\"" \
"team@blackcoin.org"
eerror ""
return 1
fi

View File

@@ -1,31 +1,31 @@
# /etc/conf.d/bitcoind: config file for /etc/init.d/bitcoind
# /etc/conf.d/blackmored: config file for /etc/init.d/blackmored
# Config file location
#BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf"
#BITCOIND_CONFIGFILE="/etc/blackmore/blackmore.conf"
# What directory to write pidfile to? (created and owned by $BITCOIND_USER)
#BITCOIND_PIDDIR="/var/run/bitcoind"
#BITCOIND_PIDDIR="/var/run/blackmored"
# What filename to give the pidfile
#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/bitcoind.pid"
#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/blackmored.pid"
# Where to write bitcoind data (be mindful that the blockchain is large)
#BITCOIND_DATADIR="/var/lib/bitcoind"
# Where to write blackmored data (be mindful that the blockchain is large)
#BITCOIND_DATADIR="/var/lib/blackmored"
# User and group to own bitcoind process
#BITCOIND_USER="bitcoin"
#BITCOIND_GROUP="bitcoin"
# User and group to own blackmored process
#BITCOIND_USER="blackmore"
#BITCOIND_GROUP="blackmore"
# Path to bitcoind executable
#BITCOIND_BIN="/usr/bin/bitcoind"
# Path to blackmored executable
#BITCOIND_BIN="/usr/bin/blackmored"
# Nice value to run bitcoind under
# Nice value to run blackmored under
#BITCOIND_NICE=0
# Additional options (avoid -conf and -datadir, use flags above)
BITCOIND_OPTS="-disablewallet"
# The timeout in seconds OpenRC will wait for bitcoind to terminate
# The timeout in seconds OpenRC will wait for blackmored to terminate
# after a SIGTERM has been raised.
# Note that this will be mapped as argument to start-stop-daemon's
# '--retry' option, which means you can specify a retry schedule

View File

@@ -1,10 +1,9 @@
[Unit]
Description=Blackmore daemon
Description=Blackcoin More Daemon
After=network.target
[Service]
ExecStart=export MALLOC_ARENA_MAX=1 && /usr/local/bin/blackmored -daemon -conf=/var/lib/.blackmore/blackmore.conf -datadir=/var/lib/.blackmore
>>>>>>> 5fbf64be585767e86ad48dbd1dfb02141a8f23ab
ExecStop=/usr/local/bin/blackmored stop
User=blackmore
Group=blackmore