openhab / openhab-syno-spk

openHAB Synology SPK Install Package
Eclipse Public License 2.0
161 stars 42 forks source link

No Dirs in openHAB2 after install OpenHAB-2.1.0.002-SNAPSHOT-DSM6-syno-noarch-0.001.spk #56

Closed agsochi closed 7 years ago

agsochi commented 7 years ago

After fresh install OpenHAB-2.1.0.002-SNAPSHOT-DSM6-syno-noarch-0.001.spk no dir structure created. Second i restore my OH2 installation from backup and try to update it using OpenHAB-2.1.0.002-SNAPSHOT-DSM6-syno-noarch-0.001.spk - all dirs was removed from OH2 dir.

cniweb commented 7 years ago

I guess the upgrade is not working properly yet. Should I take it out again? Unfortunately I can not test it myself, because I have no DiskStation with DSM6

jhlweb commented 7 years ago

I don't know if its the fix .. but it worked for me on a DS1511+ with DSM 6.0.2-8451 Update 9 the files postupgrade en postuninst are missing "> $SYNOPKG_TEMP_LOGFILE" and the conf and addons directories are removed by the postinst() but not copied to the plubic conf / addons directory only a link is made. and it should be checked if the update gives new files in these directories.

cniweb commented 7 years ago

I fix the install.sh, can you try?

cplpro227 commented 7 years ago

I would try it... Installed it 20 minutes ago and it doesn't show up the start/index/ page.

jhlweb commented 7 years ago

@cplpro227 do you have the conf and addons folder on the public share? if so fill them with the files of the conf and addons folder in the zip https://openhab.ci.cloudbees.com/job/openHAB-Distribution/lastSuccessfulBuild/artifact/distributions/openhab/target/openhab-2.1.0-SNAPSHOT.zip then it will start up. The problem is that the script on a new install or upgrade will remove all files in the folders @appstore/openHAB2/conf or @appstore/openHAB2/addons.

gorzan14 commented 7 years ago

I tried the OpenHAB-2.1.0.002-SNAPSHOT-DSM6-syno-noarch-0.001 to day and have the same problem that there are NO subfolders in it. Just start stop scripts. OH does not work.

openHAB-2.0.0.001-DSM6-syno-noarch-0.001 does work. But not the conf subfolder on public. Have to do symlink myself.

cniweb commented 7 years ago

I fix the update: https://github.com/openhab/openhab-syno-spk/commit/d2872e20ba98a34ef64932dc90bb73344facb5f0 Can you review it?

jhlweb commented 7 years ago

There is also a problem with the rights to public folder .. i have it revoked on the standard users group and added it a some user profiles.. There are no subfolder in it because the clean installation is not coping those addons / conf files only removing them and than linking to the public folder.

ill try a new install on a DS713+ tomorrow.

JackyColo commented 7 years ago

I think the install.sh do not download the openhab2.1.0.snapshot file. If I install it, it is finished after a 2 seconds and so there is no folder and no file in the folder "/volume1/@appstore/openHAB2". Only the 3 files: start_debug_runtime.sh start_runtime.sh stop_runtime.sh

cniweb commented 7 years ago

OK, do you a fresh install or do a update?

JackyColo commented 7 years ago

I tested both. Both with the same effect.

gorzan14 commented 7 years ago

I tested both and got the same result. Is der a possibility to See what happens while the Script is executed? Like Terminal?

Am 16.02.2017 um 21:22 schrieb JackyColo notifications@github.com:

I tested both. Both with the same effect.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

GorillaImNebel commented 7 years ago

Same issue here. No folders in /volume1/@appstore/openHAB2 only 3 files:

start_debug_runtime.sh start_runtime.sh stop_runtime.sh

The folder /volume1/public/openHab2/conf and /volume1/public/openHab2/addons/ both exist but are empty after the installation.

Java 8 is working fine on my DSM

Modell: DS213+ DSM version: DSM 6.0.2-8451 Update 9 Used: OpenHAB-2.1.0.002-SNAPSHOT-DSM6-syno-noarch-0.001.spk

jhlweb commented 7 years ago

Same issue here.

In general the postupgrade en postuninst files are missing some code this prohibits them to output an echo. "> $SYNOPKG_TEMP_LOGFILE" I manually untarred the 002 spk and changed the install.sh file so it matched the given changes. And tarred the spk again.

I have question about line 111 where openhab.log is created. Why not do this for events.log?

This changed packages I used here.

FRESH INSTALL------------------------ First check if the /volume1/public/ folder has read/write rights for the USERS group. (in my case it had not and this gave problem with installing. After installing you can reset this and give the openhab2 user rights to the folder /volume1/public/.

With a fresh install and /volume1public/openHAB2/conf and addons exists. The /volume1/@appstore/openHAB2/conf and addons folders are removed and not copied when public/conf and addons are empty. This is 1 problem to be solved.

Is it an idea to move the userdata folder to /volume1public/openHAB2/? Then these files can also be easily being modified. Now this must be done by SSH.

The download link in the install.sh is working with the Firefox browser on my windows system or when doing the gwet under admin privileges on my synology. I could not find out how to switch to the openhab2 user. I got "su: failed to execute /sbin/nologin: No such file or directory".

But downloading is manually and putting it in the /volume1/public/ folder works. After that for a fresh install copy the conf and addons folder from the zip to the /volume1public/openHAB2/ and it will run properly.

UPGRADE-------------------- Doing an upgrade gave the same download link problems. After putting it local in the /volume1/public/ it worked.

Also the backup file under /volume1/@appstore/ has no openhab2 user as owner but a owner number. (1043 in my case) Is this correct or should the owner be user openhab2?

Java 8 is working. NAS: DS1511+(upgrade) and DS713+(new install) DSM version: 6.1-15047 Used: OpenHAB-2.1.0.002-SNAPSHOT-DSM6-syno-noarch-0.003.spk

jhlweb commented 7 years ago

Oh i found out that the upgrade is not putting back the userdata folder from the archive. I had to add all the addons manually and what triggered me was that de login of the karaf console failed.

Maybe this is caused by not stopping the openhab package first. -oeps- Oh and i saw that the user that's doing the backup is not openhab2 it's a numeric user of the group "root"

drwxr-xr-x 6 1043 root 4096 Feb 7 12:22 openHAB2-backup-20170207_123928 drwxr-xr-x 4 1045 root 4096 Feb 7 13:36 openHAB2-backup-20170227_171614

And can't the Installer script stop the package and start it after installation?

jhlweb commented 7 years ago

@cniweb, there is also something wrong with the postupgrade() after upgrading it is not coping the usersdata. The simlinks are added .. the logs file is done.. and the chown is also done..

Can this be because of the -avr options in the command? ill try -ar when upgrading to > build 826

cniweb commented 7 years ago

@jhlweb Can you make a PR with your changes?

cniweb commented 7 years ago

Can you try my new version: https://github.com/openhab/openhab-syno-spk/releases/tag/2.1.0.004-SNAPSHOT-DSM6

cniweb commented 7 years ago

The installation seems to work with the new release. Can we close this issue?

gorzan14 commented 7 years ago

Yes

Von meinem iPhone gesendet

Am 19.07.2017 um 15:00 schrieb Christian Häussler notifications@github.com:

The installation seems to work with the new release. Can we close this issue?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.