Saturday, 23 July 2011

basex as service

  • Got it to run as service on basex account.
  • got xslt1 to work
  • wrote simple php sandbox
Not working:
  • packages
  • xslt2


basex@velvet:/etc/init.d$ cat basex
#! /bin/sh
### BEGIN INIT INFO
# Provides:     basex-server
# Required-Start:   $syslog
# Required-Stop:    $syslog
# Should-Start:     $local_fs
# Should-Stop:      $local_fs
# Default-Start:    2 3 4 5
# Default-Stop:     0 1 6
# Short-Description:    basex-server - Persistent key-value db
# Description:      basex-server - Persistent key-value db
### END INIT INFO


PATH=/opt/redis/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

case "$1" in
  start)
    echo -n "Starting $DESC: "
    su -c "basexserver -s " - basex
    ;;
  stop)
    echo "Stopping $DESC"
    basexserver stop
   ;;

  restart|force-reload)
    ${0} stop
    ${0} start
    ;;
  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload}" >&2
    exit 1
    ;;
esac

exit 0

No comments:

Post a Comment