Probleme mit Autostart
Hi,
Ich habe die Skripte und alle Befehle durchgeführt und siehe es versucht zu laufen Problem ist nur java macht irgendein Problem ich habe raspbian wheezy von dez 2013 installiert und kein weiteres java
root@raspberrypi:/etc/init.d# ./openhab start
: not found3: /etc/default/openhab:
find:`./server': No such file or directory
Launching the openHAB runtime..
root@raspberrypi:/etc/init.d# Unrecognized option: -console
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
verwendetes Skript :
#! /bin/sh
### BEGIN INIT INFO
# Provides: starts openhab from home
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Kurze Beschreibung
# Description: Längere Bechreibung
### END INIT INFO
# Author:
# set ports for HTTP(S) server
HTTP_PORT=8080
HTTPS_PORT=8443
if test -f /etc/default/openhab; then
. /etc/default/openhab
else
echo "Please set OPENHABPATH in /etc/default/openhab"
exit 1
fi
# Aktionen
case "$1" in
start)
if [ -f /var/run/openhab.pid ]; then
echo "openhab seems to run allready. If not, please delete /var/run/openhab.pid"
else
cd $OPENHABPATH
# get path to equinox jar inside $OPENHABPATH folder
cp=$(find ./server -name "org.eclipse.equinox.launcher_*.jar" | sort | tail -1);
echo Launching the openHAB runtime..
java -Dosgi.clean=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Djetty.port=$HTTP_PORT -Djetty.port.ssl=$HTTPS_PORT -Djetty.home=. -Dlogback.configurationFile=configurations/logback.xml -Dfelix.fileinstall.dir=addons -Djava.library.path=lib -Djava.security.auth.login.config=./etc/login.conf -Dorg.quartz.properties=./etc/quartz.properties -Dequinox.ds.block_timeout=240000 -Dequinox.scr.waitTimeOnBlock=60000 -Djava.awt.headless=true -jar $cp -console &> /dev/null
echo $! > /var/run/openhab.pid
fi
;;
stop)
echo "stopping openhab"
kill `cat /var/run/openhab.pid`
rm /var/run/openhab.pid
;;
restart)
actPid=`cat /var/run/openhab.pid`
$0 stop
while [ `ps -ef | grep $actPid | wc -l` -gt 1 ]
do
echo -n .
sleep 2
done
echo
$0 start
;;
esac
exit 0
villeicht könnt ihr mir Helfen
Hi,
Ich habe die Skripte und alle Befehle durchgeführt und siehe es versucht zu laufen Problem ist nur java macht irgendein Problem ich habe raspbian wheezy von dez 2013 installiert und kein weiteres java
root@raspberrypi:/etc/init.d# ./openhab start
: not found3: /etc/default/openhab:
find:`./server': No such file or directory
Launching the openHAB runtime..
root@raspberrypi:/etc/init.d# Unrecognized option: -console
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
verwendetes Skript :
#! /bin/sh
### BEGIN INIT INFO
# Provides: starts openhab from home
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Kurze Beschreibung
# Description: Längere Bechreibung
### END INIT INFO
# Author:
# set ports for HTTP(S) server
HTTP_PORT=8080
HTTPS_PORT=8443
if test -f /etc/default/openhab; then
. /etc/default/openhab
else
echo "Please set OPENHABPATH in /etc/default/openhab"
exit 1
fi
# Aktionen
case "$1" in
start)
if [ -f /var/run/openhab.pid ]; then
echo "openhab seems to run allready. If not, please delete /var/run/openhab.pid"
else
cd $OPENHABPATH
# get path to equinox jar inside $OPENHABPATH folder
cp=$(find ./server -name "org.eclipse.equinox.launcher_*.jar" | sort | tail -1);
echo Launching the openHAB runtime..
java -Dosgi.clean=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Djetty.port=$HTTP_PORT -Djetty.port.ssl=$HTTPS_PORT -Djetty.home=. -Dlogback.configurationFile=configurations/logback.xml -Dfelix.fileinstall.dir=addons -Djava.library.path=lib -Djava.security.auth.login.config=./etc/login.conf -Dorg.quartz.properties=./etc/quartz.properties -Dequinox.ds.block_timeout=240000 -Dequinox.scr.waitTimeOnBlock=60000 -Djava.awt.headless=true -jar $cp -console &> /dev/null
echo $! > /var/run/openhab.pid
fi
;;
stop)
echo "stopping openhab"
kill `cat /var/run/openhab.pid`
rm /var/run/openhab.pid
;;
restart)
actPid=`cat /var/run/openhab.pid`
$0 stop
while [ `ps -ef | grep $actPid | wc -l` -gt 1 ]
do
echo -n .
sleep 2
done
echo
$0 start
;;
esac
exit 0
villeicht könnt ihr mir Helfen
Kommentar