#!/bin/bash

which soffice >/dev/null 2>&1 
if [ $? = 0 ] ; then

  echo "Starting up Open Office Server (headless mode)"

  soffice "-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -headless

  echo "Testing to see if soffice is listening on port 8100"

  netstat -an | grep 8100
else 
  echo ""
  echo "Error: Unable to find 'soffice' on PATH environment variable"
  echo ""
fi



