Coder Social home page Coder Social logo

Comments (29)

vectah0 avatar vectah0 commented on May 29, 2024 1

@yphyph01

A temp workaround for getting proper status of the package in DSM 6 beta2 could be something like this:

Edit:
/var/packages/OpenHAB/scripts/start-stop-status.sh

Add PID variable:

PIDFILE="/var/services/homes/openhab/.daemon.pid"

Change status to:

  status)
    [ ! -f "$PIDFILE" ] && return 1

        if ps -p $(cat "$PIDFILE") > /dev/null; then
                exit 0
                    else
                exit 1
        fi
        ;;

It should now return package status properly

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

Hi Yann,

take a look here:
https://www.synology.com/de-de/dsm/6.0beta/ReleaseNote#known_issue
or report a bug:
https://account.synology.com/support/beta_dsm_form.php

Regards,
Chris

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

@yphyph01 can I close this issue?

from openhab-syno-spk.

yphyph01 avatar yphyph01 commented on May 29, 2024

Hi Christian,

Thank you for your answer and follow-up.

I’ve opened a case to synology. This issue is not yet a recognized synology bug.

So basically, I don’t know if the issue comes from the DSM 6 or from the package.

Do you have any successful installation on DSM6.0 Beta?

Regards

Yann

De : Christian Häussler [mailto:[email protected]]
Envoyé : mercredi 20 janvier 2016 16:11
À : cniweb/openhab-syno-spk [email protected]
Cc : yphyph01 [email protected]
Objet : Re: [openhab-syno-spk] Package 1.8.0: Enabled User Home Service (#3)

@yphyph01 https://github.com/yphyph01 can I close this issue?


Reply to this email directly or view it on GitHub #3 (comment) . https://github.com/notifications/beacon/APhY_MQPeYh-yKkhI5jtYS-_yyBlhTPiks5pb5r9gaJpZM4HDzvM.gif

from openhab-syno-spk.

itn3rd77 avatar itn3rd77 commented on May 29, 2024

Hi,

tried install on DSM 6 Beta2 with the same error. User Home Service is activated.

Any ideas?

Regards,

Ingo

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

OK, suggestion:
We gather here to experience DSM 6.0 and OpenHAB regarding User Home Service.
Please inform me, with whom it works and not with whom.
Depending on the result, we will see if a patch for DSM 6.0 packages is necessary or not.

OK?

Thanks,
Chris

from openhab-syno-spk.

itn3rd77 avatar itn3rd77 commented on May 29, 2024

Ok. Here is what I figured out so far.

Inside the installer.sh you check if the "User-Home Service" is enabled by creating a new user and checking if the home directory exists.

With DSM 6.0 the creation of the home directory seems to take place asynchronously. I had to put a "sleep 3" after the line where you create the user Testing123.

After all I wondered if the is a better way to check if the "User-Home Service" is enabled. And found the command 'synogetkeyvalue'. You can check if the "User-Home Service" is enabled with the following command:

synogetkeyvalue /etc/synoinfo.conf userHomeEnable

This gives you 'no' or 'yes' as result. Don´t know if this is DSM 6.0 specific. I don´t have access to a a box running DSM 5.2 anymore.

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

OK, i try it in DSM 5.2, it works:

synogetkeyvalue /etc/synoinfo.conf userHomeEnable
yes

I make a patch and a new preversion for 1.8.0 (DSM 6.0), OK?

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

I have add a new prerelease:
https://github.com/cniweb/openhab-syno-spk/releases/tag/1.8.0.003
Please try!

from openhab-syno-spk.

yphyph01 avatar yphyph01 commented on May 29, 2024

thank you for your work Christian.
I've tested the new SPK on DSM 6.0Beta2.
The "Enabled User Home Service" error disappeared.

Good step ahead but I'm still facing a issue at the end of the installation with a crazy message :"The package is successfully installed. Please Launch the package to repair it".

My quick observations:

  • the openhab daemon user is created and enabled.
  • the openhab user is member of my users group with R/W permission to its home dir
  • the openhab HomeDir exists with 2 files in it: .daemin.pid and .profile
  • the openahb package is stopped. clicking on "Launch" doesn't help to start the service

How could I help you to investigate this issue?
Any idea on the issue?

Regards

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

OK I try it on a DSM 5.2, it´s work!

Can you look in your log files (/var/logs)?

from openhab-syno-spk.

yphyph01 avatar yphyph01 commented on May 29, 2024

@cniweb
Hi,
I found an error on the synopkg.log file:
2016/02/01 20:14:31 install OpenHAB 1.8.0-003: Begin: postinst /var/packages/OpenHAB/scripts/installer.sh: line 79: unzip: command not found mv: cannot stat ‘/volume2/@tmp/OpenHAB-runtime-1.8.0/*’: No such file or directory rmdir: failed to remove ‘/volume2/@tmp/OpenHAB-runtime-1.8.0’: No such file or directory 2016/02/01 20:14:40 install OpenHAB 1.8.0-003: End: postinst ret=[0]

Indeed, Synology remove the unzip command in the DSM 6 Beta version. It's replace by 7zip.
Please have a look at: https://forum.synology.com/enu/viewtopic.php?f=260&t=106327&p=400791&hilit=unzip#p400791

I'll try to update your installer.sh with the 7zip command

Regards

from openhab-syno-spk.

yphyph01 avatar yphyph01 commented on May 29, 2024

@cniweb
in installer.sh, replacing the line 79 with
7z x ${TEMP_FOLDER}/${DOWNLOAD_FILE} -o${EXTRACTED_FOLDER} && rm ${TEMP_FOLDER}/${DOWNLOAD_FILE}
and the files are correctly unzipped
But that's not enough.
I've noticed that we don't have the control of the package. In the package center, the openhab package is always shown as "stopped" but the package is running. java processes are executed and shown in process list.So, we can't start or stop the package

Hope this help

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

Since I have no DiskStation on DSM 6 Beta is running, I can not try it out unfortunately. I can not help you, unfortunately, I'm sorry!

from openhab-syno-spk.

vectah0 avatar vectah0 commented on May 29, 2024

I can confirm that there is no service control of the package on DSM 6.0beta. Package is always being shown as stopped

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

@vectah0
Looks good, I should adjust it in my package?

A general question: Would not it be better to build your own package for 6.0, it has apparently changed much?

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

OK, i create a new branch for DSM 6 beta package and change the status check:
0c1c4dc
And the unzip command to 7z:
5ad20a0

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

OK, I have the two requirements now separated!
This Issue is only for a package > DSM 6

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

I make a new release:
https://github.com/openhab/openhab-syno-spk/releases/tag/1.8.1-DSM6-beta
Please try and provide feedback, thanks!

from openhab-syno-spk.

xbmcnut avatar xbmcnut commented on May 29, 2024

@vectah0 Can you please advise where I place the 'Add PID variable' in the start-stop-status.sh?

from openhab-syno-spk.

vectah0 avatar vectah0 commented on May 29, 2024

you place it at the beginning of the start-stop-status.sh file where other variables are defined

from openhab-syno-spk.

xbmcnut avatar xbmcnut commented on May 29, 2024

Thanks @vectah0. Like this?

DAEMON_USER="`echo ${SYNOPKG_PKGNAME} | awk {'print tolower($_)'}`"
DAEMON_ID="${SYNOPKG_PKGNAME} daemon user"
ENGINE_SCRIPT="start_runtime.sh"
DAEMON_USER_SHORT=`echo ${DAEMON_USER} | cut -c 1-8`
PIDFILE="/var/services/homes/openhab/.daemon.pid"

daemon_status ()

from openhab-syno-spk.

vectah0 avatar vectah0 commented on May 29, 2024

yes

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

This exactly I have implemented:
https://github.com/openhab/openhab-syno-spk/blob/DSM-6.0-beta/scripts/start-stop-status.sh#L10
in my DSM6 Package:
https://github.com/openhab/openhab-syno-spk/releases/tag/1.8.1-DSM6-beta
Where is your problem?

from openhab-syno-spk.

xbmcnut avatar xbmcnut commented on May 29, 2024

@cniweb Thank you, but not working for me under 2.0.0-beta2 with DSM 5.2-5644 Update 5. OH2 working fine, service not showing as running in Package Manager though.

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

@yphyph01 This Issue is only for DSM6 package, open a new Issue or use #4, please.

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

I have released a new OpenHab 2.0 DSM 6 release:
https://github.com/openhab/openhab-syno-spk/releases/tag/2.0.0-beta2-DSM6-RC
Try it, please!

from openhab-syno-spk.

cniweb avatar cniweb commented on May 29, 2024

@yphyph01 @itheiss Can I close this Issue?

from openhab-syno-spk.

yphyph01 avatar yphyph01 commented on May 29, 2024

Yes, I think you can close this thread. A DSM 6 package is available. The issue #17 is used for the bug fixing of the package.
Regards

from openhab-syno-spk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.