How do I start Fuseki on OS startup?

Is there an easy way to start Fuseki on OS startup more or less, since we can start a Tomcat or ElasticSearch instance from /etc/init.d/tomcat7 start or /etc/init.d/elasticsearch start ?

As I understand it, Fuseki doesn't seem to have a status method , nor does it seem like something similar to this /etc/init.d/ .

+3


source to share


1 answer


Actually, Fuseki comes with a script that does exactly what you ask. I think the question is about how to place the fuseki script in the init.d directory . The fuseki script that comes with the distribution takes an argument {start | stop | restart | status} . This is what it looks like on the command line:

$ ./fuseki
Usage: fuseki {start|stop|restart|status}
$ ./fuseki status
Fuseki is not running
$ ./fuseki start
Starting Fuseki: Redirecting Fuseki stderr/stdout to .../jena-fuseki-1.1.2-SNAPSHOT/log/stderrout.log
STARTED Fuseki Mon Oct 27 10:02:59 EDT 2014
PID=3752
$ ./fuseki status
Fuseki is running with pid: 3752
$ ./fuseki restart
Stopping Fuseki: OK
Starting Fuseki: Redirecting Fuseki stderr/stdout to .../jena-fuseki-1.1.2-SNAPSHOT/log/stderrout.log
STARTED Fuseki Mon Oct 27 10:03:09 EDT 2014
PID=3813
$ ./fuseki status
Fuseki is running with pid: 3813
$ ./fuseki stop
Stopping Fuseki: OK
$ ./fuseki status
Fuseki is not running

      

It really is designed for this purpose; looking at the source we see:



# Startup script for Fuseki under *nix systems (works with cygwin too)
#
# Configuration
# -------------
# Default values are loaded from /etc/default/fuseki, if it exists.

      

& vellip;

# FUSEKI_HOME
#   Where Fuseki is installed.  If not set, the script will try
#   to guess it based on the script invokation path.
#
# FUSEKI_RUN
#   Where the fuseki.pid file should be stored.  It defaults
#   first available of /var/run, /usr/var/run, and /tmp if not set.
#
# FUSEKI_PID
#   The FUSEKI PID file, defaults to $FUSEKI_RUN/fuseki.pid
#
# FUSEKI_ARGS
#   The arguments to pass to the Fuseki server on the command line. Defaults to:
#    --update --loc=$FUSKEI_DATA_DIR /ds    # if FUSEKI_CONF is not set
#    --config=$FUSEKI_CONF                  # if FUSEKI_CONF is set
#
# FUSEKI_CONF
#   The Fuseki configuration file, usually in RDF Turtle notation.
#
# FUSEKI_USER
#   If set, the server will be run as this user
#
# FUSEKI_DATA_DIR
#   The location of the data directory Fuseki will use (i.e. the value of --loc).
#   Defaults to $FUSEKI_HOME/DB
#
# FUSEKI_LOGS
#   Directory where logs will be generated. Defaults to $FUSEKI_HOME/log
#
# FUSEKI_LOGS_STDERROUT
#   Log file with stderr and stdout log output from Fuseki. Defaults to
#   $FUSEKI_LOGS/stderrout.log

      

+5


source







All Articles