mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
be4345ce12
000000035b20402dea3e8168165cd4eefdc97539 Obsolete #!/bin/bash shebang (DesWurstes) Pull request description: > `#!/bin/bash` assumes it is always installed to `/bin/` which can cause issues > `#!/usr/bin/env bash` searches the user's `PATH` to find the `bash` binary Details: https://github.com/dylanaraps/pure-bash-bible#obsolete-syntax I'm open to comments: Should I also fix `#!/bin/sh`? Tree-SHA512: b47bb4828116aa119f1899c68fee081270d51a898535490b9c616bf0f3660ad953f29c361eafc759bc64cdd54ee6eeecb2d79e9fdb5291a996a515c719805476
68 lines
1.2 KiB
Bash
68 lines
1.2 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
|
|
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
|