Last active
February 5, 2017 14:56
-
-
Save apb2006/2666375 to your computer and use it in GitHub Desktop.
init.d script for BaseX server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: basexhttp | |
# Required-Start: | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: basex initscript | |
# Description: basex | |
### END INIT INFO | |
# Author: Andy Bunce | |
#BASEX_HOME=/opt/basex/bin | |
BASEX_HOME=/home/basex/basex/bin | |
# Carry out specific functions when asked to by the system | |
case "$1" in | |
start) | |
echo "Starting BaseX server and HTTP" | |
$BASEX_HOME/basexhttp -S | |
;; | |
stop) | |
echo "Stopping BaseX server" | |
$BASEX_HOME/basexhttp stop | |
;; | |
*) | |
echo "Usage: /etc/init.d/basexhttp {start|stop}" | |
exit 1 | |
;; | |
esac | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pid file created but empty