starting openhab vie init-script = no logging

225 views
Skip to first unread message

Christoph Wempe

unread,
Apr 27, 2013, 1:25:10 PM4/27/13
to ope...@googlegroups.com
I installed openhab on my HTPC (ubuntu).

I am using this init-script to run openhab as a deamon.

Everything works fine except logging.

I changed the RUN_AS-variable in the init-script to myself.
"ps aux | grep java" shows the right user-id.
1000     24714 53.2  2.5 3377448 210416 ?      Sl   19:17   0:09 /usr/bin/java -Dosgi.clean=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Djetty.port=8082 -Djetty.port.ssl=8443 -Djetty.home=/opt/openhab -Dlogback.configurationFile=/configurations/logback.xml -Dfelix.fileinstall.dir=/opt/openhab/addons -Djava.library.path=/opt/openhab/lib -Djava.security.auth.login.config=/opt/openhab/etc/login.conf -Dorg.quartz.properties=/opt/openhab/etc/quartz.properties -Djava.awt.headless=true -jar /opt/openhab/server/plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar -console 5555

If I start openhab manually logging works.
christoph@htpc:~$ /opt/openhab/start.sh

Local logging (/opt/openhab/logs/openhab.log) and syslog.

Any ideas where my problem is?

David

unread,
Apr 27, 2013, 5:55:28 PM4/27/13
to ope...@googlegroups.com
Hi Christoph,

The daemon script by Thomas has a typo in it.

DAEMON_ARGS="-Dosgi.clean=true -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Djetty.port=8080 -Djetty.port.ssl=8443 -Djetty.home=$ECLIPSEHOME -Dlogback.configurationFile=$
ECLISEHOME/configurations/logback.xml -Dfelix.fileinstall.dir=$ECLIPSEHOME/addons -Djava.library.path=$ECLIPSEHOME/lib -Djava.security.auth.login.config=$ECLIPSEHOME/etc/login.conf -Dorg.quartz.properties=$ECLIPSEHOME/etc/quartz.properties -Djava.awt.headless=true -jar $cp -console ${TELNETPORT}"

If you change $ECLISEHOME to $ECLIPSEHOME, you can define the location of the log file in logback.xml (use full paths, no relative paths). Worked for me ;-)
Nice script by the way.

Cheers,
David


Op zaterdag 27 april 2013 19:25:10 UTC+2 schreef Christoph Wempe het volgende:

alfonso...@gmail.com

unread,
Apr 27, 2013, 7:35:58 PM4/27/13
to ope...@googlegroups.com
Good work David!

I was struggling about this issue for a while....

I have read and reread code, no go.

Really good work!

Thanks!
Greetings,

Alfonso

Christoph Wempe

unread,
Apr 27, 2013, 9:21:20 PM4/27/13
to ope...@googlegroups.com
Tanks!
It works now.

btw: I think the init-script should be postet in the Tricks-Wiki. :)

Kai Kreuzer

unread,
Apr 28, 2013, 2:44:33 PM4/28/13
to ope...@googlegroups.com
btw: I think the init-script should be postet in the Tricks-Wiki. :)

Any volunteer?

David

unread,
Apr 29, 2013, 6:18:27 PM4/29/13
to ope...@googlegroups.com
I could post it but I didn't create the daemon script.
@Thomas Brettinger is it ok to post this script on the Tricks-Wiki?

Regards,
David

Op zondag 28 april 2013 20:44:33 UTC+2 schreef Kai het volgende:
Reply all
Reply to author
Forward
0 new messages