r1
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# agrariand The Agrarian core server.
|
||||
#
|
||||
#
|
||||
# chkconfig: 345 80 20
|
||||
# description: agrariand
|
||||
# processname: agrariand
|
||||
#
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
# you can override defaults in /etc/sysconfig/agrariand, see below
|
||||
if [ -f /etc/sysconfig/agrariand ]; then
|
||||
. /etc/sysconfig/agrariand
|
||||
fi
|
||||
|
||||
RETVAL=0
|
||||
|
||||
prog=agrariand
|
||||
# you can override the lockfile via BITCOIND_LOCKFILE in /etc/sysconfig/agrariand
|
||||
lockfile=${BITCOIND_LOCKFILE-/var/lock/subsys/agrariand}
|
||||
|
||||
# agrariand defaults to /usr/bin/agrariand, override with BITCOIND_BIN
|
||||
bitcoind=${BITCOIND_BIN-/usr/bin/agrariand}
|
||||
|
||||
# agrariand opts default to -disablewallet, override with BITCOIND_OPTS
|
||||
bitcoind_opts=${BITCOIND_OPTS}
|
||||
|
||||
start() {
|
||||
echo -n $"Starting $prog: "
|
||||
daemon $DAEMONOPTS $bitcoind $bitcoind_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
|
||||
Reference in New Issue
Block a user