mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
cca430ba9a
7fb7acfc206b4bf8c296d72b66f3bd4fe342fd87 Set init stop timeout to 10 min (setpill)
Pull request description:
`bitcoind` can take a long time to flush its db cache to disk upon
shutdown. Systemd sends a `SIGKILL` after a timeout, causing unclean
shutdowns and triggering a long "Rolling forward" at the next startup.
Disabling the timeout should prevent this from happening, and does not
break systemd's `restart` logic.
Addresses #13736.
ACKs for top commit:
instagibbs:
utACK 7fb7acfc20
Tree-SHA512: 16e0ce5a9ecf0628f8d93d68db3f5a78ab36021d9bede05a90c84f144db2e87e17707a6eb910cb7c018c265ce2c81d43de2988bd79e4a2d8554515db8fb5aa36
68 lines
1.3 KiB
Bash
68 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
#
|
|
# dashd The Dash Core server.
|
|
#
|
|
#
|
|
# chkconfig: 345 80 20
|
|
# description: dashd
|
|
# processname: dashd
|
|
#
|
|
|
|
# Source function library.
|
|
. /etc/init.d/functions
|
|
|
|
# you can override defaults in /etc/sysconfig/dashd, see below
|
|
if [ -f /etc/sysconfig/dashd ]; then
|
|
. /etc/sysconfig/dashd
|
|
fi
|
|
|
|
RETVAL=0
|
|
|
|
prog=dashd
|
|
# you can override the lockfile via BITCOIND_LOCKFILE in /etc/sysconfig/dashd
|
|
lockfile=${BITCOIND_LOCKFILE-/var/lock/subsys/dashd}
|
|
|
|
# dashd defaults to /usr/bin/dashd, override with BITCOIND_BIN
|
|
dashd=${BITCOIND_BIN-/usr/bin/dashd}
|
|
|
|
# dashd opts default to -disablewallet, override with BITCOIND_OPTS
|
|
dashd_opts=${BITCOIND_OPTS--disablewallet}
|
|
|
|
start() {
|
|
echo -n $"Starting $prog: "
|
|
daemon $DAEMONOPTS $dashd $dashd_opts
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL -eq 0 ] && touch $lockfile
|
|
return $RETVAL
|
|
}
|
|
|
|
stop() {
|
|
echo -n $"Stopping $prog: "
|
|
killproc $prog -t600
|
|
RETVAL=$?
|
|
echo
|
|
[ $RETVAL -eq 0 ] && rm -f $lockfile
|
|
return $RETVAL
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
status)
|
|
status $prog
|
|
;;
|
|
restart)
|
|
stop
|
|
start
|
|
;;
|
|
*)
|
|
echo "Usage: service $prog {start|stop|status|restart}"
|
|
exit 1
|
|
;;
|
|
esac
|