Skip to content

Instantly share code, notes, and snippets.

@apb2006
Last active February 5, 2017 14:56
Show Gist options
  • Save apb2006/2666375 to your computer and use it in GitHub Desktop.
Save apb2006/2666375 to your computer and use it in GitHub Desktop.
init.d script for BaseX server
#!/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
@apb2006
Copy link
Author

apb2006 commented May 12, 2012

pid file created but empty

@apb2006
Copy link
Author

apb2006 commented Jun 6, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment