#!/bin/sh
#
# LSB-style init script for a fictional "myservice" service.
# To install this, edit, name with the name of your service,
# make executable, and place in /etc/init.d.

# Startstop does not rely on any of these, but LSB
# specifies we should source this file.
if [ -f /lib/lsb/init-functions ]; then
  . /lib/lsb/init-functions
fi

### BEGIN INIT INFO
# Provides:       myservice
# Required-Start: 
# Required-Stop:  
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Description:    myservice daemon
### END INIT INFO

export PATH=/usr/bin:/bin
export CLASSPATH=/path/to/classes...

startstop -m -u nobody -l /var/log/$SERVICE.log $SERVICE "$1" \
  /usr/bin/java -Xms100m -Xmx100m com.mycompany.Server
