Closed fsedarkalex closed 7 years ago
Hi @fsedarkalex,
under what firmware your package runs? We have 2 branches, for <= 5.2 and 6.0...
What a DS model you use?
Thank you for your involvement!
Chris
Well I don't use a real DS :) I am a user of XPenology (Synology DSM on x86 hardware) but there is no difference in the OS. The only difference is the Bootloader. Guess the x86 is what you wanted to know though...
I'm currently running on latest stable 5.2 update
@kaikreuzer Can you help me? -> Probably one should send stop commands directly to the osgi framework?
Well I can help :) You have to send "stop 0" to console for openhab 1.x or "logout" for 2.x followed by a linebreak
OK, How the command should look like in the stop_runtime.sh script?
I am trying... please be patient I'm near a solution
#!/bin/ash
PID=$(cat ~/.daemon.pid)
counter=0
{ sleep 3; printf "stop 0\n"; sleep 3; } | telnet 127.0.0.1 5555
while true;
do
if [ -e /proc/${PID} -a /proc/${PID}/exe ]
then
if [ $counter -gt 19 ];
then
kill -9 $PID
break
fi
counter=$((counter+1))
echo "openhab is still running with pid $PID. Waiting for 3 more seconds"
sleep 3
else
echo "openhab has terminated as expected."
break
fi
done
rm -f ~/.daemon.pid
that's the solution under a normal envronment but unfortunately busybox does not allow piping to telnet... Sorry BusyBox is not my special friend :d Probably someone else has an idea how to pass the stop command to the osgi telnet console?
//Edit: Probably @kaikreuzer has a better Idea...
Better ask @teichsta for help on OH 1.8... With OH 2, the kill (even the soft one using "kill -2" which equals a Ctrl+C) works well and in any case you should probably rather use ./runtime/karaf/bin/start and ./runtime/karaf/bin/stop for OH2.
@fsedarkalex can you try "kill -2"? It is better?
The installation work now? Can we close this issue?
Hi!
for some reason the stop button is not working correctly. I debugged it a bit and noticed that openHAB does not react to the normal kill signal.
I did a workaround but it's not a good idea to do it like that I think (stop_runtime.sh):
I let OH 12 seconds before killing but I think that does not change anything... Probably one should send stop commands directly to the osgi framework?