mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
7d55e623a8
a5328a1
Change Dash -> Dash Core where appropriate (in strings)b8696d9
Change user/group dash->dashcore69dc9f1
Change dash->dashcore for /etc/ and /var/lib/ folders
68 lines
1.2 KiB
Bash
68 lines
1.2 KiB
Bash
#!/bin/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
|
|
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
|