openhab / openhab-syno-spk

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

Installing with configurable mounting folder "conf", "logs" and "addons" #40

Closed cniweb closed 7 years ago

cniweb commented 7 years ago

Installing OH2 with configurable mounting folder "conf", "logs" and "addons"

yphyph01 commented 7 years ago

After a fresh new installation using Release 2.0 DSM6, I modified the openHAB2 installation to relocate the addons, conf and logs folders. Using Symbolic links, relocation of those folrders were working on openHAB1.8, but I couldn't achieve to have them working on openHAB2. So instead of relocating the folders, I've create external links to them to have acess to those folders from my /volume1/public folder. Here are the commands: admin@DiskStation:/volume1/public$ mkdir openHAB2/ admin@DiskStation:/volume1/public$ cd openHAB2/ admin@DiskStation:/volume1/public/openHAB2$ ln -s /volume1/@appstore/openHAB2/co nf conf admin@DiskStation:/volume1/public/openHAB2$ ln -s /volume1/@appstore/openHAB2/ad dons addons admin@DiskStation:/volume1/public/openHAB2$ ln -s /volume1/@appstore/openHAB2/us erdata/logs logs

and the results:

admin@DiskStation:/volume1/public/openHAB2$ dir total 12 drwxrwxrwx+ 1 admin users 28 Jan 25 16:19 . drwxrwxrwx+ 1 root root 632 Jan 25 16:17 .. lrwxrwxrwx 1 admin users 34 Jan 25 16:19 addons -> /volume1/@appstore/openHAB2 /addons lrwxrwxrwx 1 admin users 32 Jan 25 16:18 conf -> /volume1/@appstore/openHAB2/c onf lrwxrwxrwx 1 admin users 41 Jan 25 16:19 logs -> /volume1/@appstore/openHAB2/u serdata/logs `

cniweb commented 7 years ago

I think, the config from OH2 was diffrent to OH1, see: http://docs.openhab.org/tutorials/migration.html

darth-hp commented 7 years ago

With #48 I removed outcommented parts which had no use (for me) in the installer.sh - these where meant to create the links.

During todays installation I realized the following in the description If the directory /volume1/public/openHAB2/conf exists, this directory will be used for all openHAB2 configuration files.

Let's try a two-step here:

@cniweb @yphyph01

darth-hp commented 7 years ago

I had no luck creating links at first, means they did not appear in the SMB mount. I figured out that the SMB service requires extra settings to allow this, but provides potential access to other shared folders. Well, I think that's okay for a home usage but maybe it makes more sense to tell openHAB2 where the conf folder is.

But linking the other way round is working for me. So that might be the better approach.

darth-hp commented 7 years ago

Just stumbled across the following which can also be used: mkdir -p /volume1/public/openHAB2/conf mount -o bind /volume1/@appstore/openHAB2/conf /volume1/public/openHAB2/conf

keepsmilyn commented 4 years ago

That looked like a terrific fix for me, but unfortunately I get the following error when trying to 'mount': mount: only root can use "--options" option. Sigh! Any work around for this??

keepsmilyn commented 4 years ago

Had to use sudo infront of the mount command to get it to work.