  	eq3configcmd wait-for-file -f $STARTWAITFILE -p 5 -t 300
  	echo "OK"
  }
+ stop() {
+-	echo -n "Stopping HMServer: "
++	echo -n "Stopping ${HM_SERVER_TYPE}: "
+ 	rm -f $STARTWAITFILE
+ 	start-stop-daemon -K -q -p $PIDFILE
+ 	rm -f $PIDFILE
 --- homematic/WebUI/www/api/homematic.cgi.orig
 +++ homematic/WebUI/www/api/homematic.cgi
 @@ -22,15 +22,13 @@

 	export PATH=$PATH:$JAVA_HOME/bin
 	if [ ! -e /etc/config/log4j.xml ] ; then
 		cp $CFG_TEMPLATE_DIR/log4j.xml /etc/config
@@ -20,8 +33,8 @@
 start() {
 	echo -n "Starting HMServer: "
 	init
-	start-stop-daemon -S -q -m -p $PIDFILE --exec java -- -Xmx64m -Dlog4j.configuration=file:///etc/config/log4j.xml -Dfile.encoding=ISO-8859-1 -jar /opt/HMServer/HMIPServer.jar /etc/crRFD.conf &
-	echo "Waiting for HMServer to get ready"

 
--- homematic/HMserver/etc/init.d.orig
+++ homematic/HMserver/etc/init.d
@@ -5,12 +5,27 @@
 
 LOGLEVEL_HMServer=5
 CFG_TEMPLATE_DIR=/etc/config_templates
