mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
* Add validators and validation_quorum from the v0.16 release notes. * We keep having to tell people to do this during integration, let's just make it the default. * Add comment about the log file location that states that it has to be absolute rather than relative after an integration troubleshoot earlier today. Signed-off-by: Bryce Lynch <bryce@ripple.com>
102 lines
2.3 KiB
Bash
102 lines
2.3 KiB
Bash
#!/bin/sh
|
|
|
|
### BEGIN INIT INFO
|
|
# Provides: ripple
|
|
# Required-Start: $local_fs $remote_fs $network $syslog
|
|
# Required-Stop: $local_fs $remote_fs $network $syslog
|
|
# Default-Start: 2 3 4 5
|
|
# Default-Stop: 0 1 6
|
|
# Short-Description: starts the ripple network node
|
|
# Description: starts rippled using start-stop-daemon
|
|
### END INIT INFO
|
|
|
|
set -e
|
|
|
|
NAME=rippled
|
|
USER="rippled"
|
|
GROUP="rippled"
|
|
PIDFILE=/var/run/$NAME.pid
|
|
DAEMON=/usr/local/sbin/rippled
|
|
DAEMON_OPTS="--conf /etc/ripple/rippled.cfg"
|
|
NET_OPTS="--net $DAEMON_OPTS"
|
|
|
|
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
|
|
|
|
case "$1" in
|
|
start)
|
|
echo -n "Starting daemon: "$NAME
|
|
start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE \
|
|
--exec $DAEMON --chuid $USER --group $GROUP --verbose -- $NET_OPTS
|
|
echo "."
|
|
;;
|
|
|
|
stop)
|
|
echo -n "Stopping daemon: "$NAME
|
|
$DAEMON $DAEMON_OPTS stop
|
|
rm -f $PIDFILE
|
|
echo "."
|
|
;;
|
|
|
|
restart)
|
|
echo -n "Restarting daemon: "$NAME
|
|
$DAEMON $DAEMON_OPTS stop
|
|
rm -f $PIDFILE
|
|
start-stop-daemon --start --quiet --background -m --pidfile $PIDFILE \
|
|
--exec $DAEMON --chuid $USER --group $GROUP -- $NET_OPTS
|
|
echo "."
|
|
;;
|
|
|
|
status)
|
|
echo "Status of $NAME:"
|
|
echo -n "PID of $NAME: "
|
|
if [ -f "$PIDFILE" ]; then
|
|
cat $PIDFILE
|
|
$DAEMON $DAEMON_OPTS server_info
|
|
else
|
|
echo "$NAME not running."
|
|
fi
|
|
echo "."
|
|
;;
|
|
|
|
fetch)
|
|
echo "$NAME ledger fetching info:"
|
|
$DAEMON $DAEMON_OPTS fetch_info
|
|
echo "."
|
|
;;
|
|
|
|
uptime)
|
|
echo "$NAME uptime:"
|
|
$DAEMON $DAEMON_OPTS get_counts
|
|
echo "."
|
|
;;
|
|
|
|
startconfig)
|
|
echo "$NAME is being started with the following command line:"
|
|
echo "$DAEMON $NET_OPTS"
|
|
echo "."
|
|
;;
|
|
|
|
command)
|
|
# Truncate the script's argument vector by one position to get rid of
|
|
# this entry.
|
|
shift
|
|
|
|
# Pass the remainder of the argument vector to rippled.
|
|
$DAEMON $DAEMON_OPTS "$@"
|
|
echo "."
|
|
;;
|
|
|
|
test)
|
|
$DAEMON $DAEMON_OPTS ping
|
|
echo "."
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart|status|fetch|uptime|startconfig|"
|
|
echo " command|test}"
|
|
exit 1
|
|
esac
|
|
|
|
exit 0
|
|
|