Open ms777 opened 7 years ago
Hi @ms777,
I'm not familiar with this kind of system functionality.
Am I right, that we copy or create the script at the installation and call it each time openhab starts/stops?
... no. This must be called at Synology boot time with the parameter "start", and should be called with "stop" prior to synology shutdown.
This script is placed in /usr/local/etc/rc.d/ (see the comment section). Then the above happens automagically I am not sure if this should be integrated into the installer, as there probably are too many variations of to-be-saved folders possible. Just wanted to post it somewhere ...
An alternative is to plug in a usb key in your Synology and log there. That way my hard drives will enter hibernate mode. I made a pdf which can be downloaded here: https://community.openhab.org/t/synology-diskstation/1446/124
Update 2017-09-29: verified - this still works with latest pre-release 2.2.0.007-SNAPSHOT
It would be great if this could be included. Allows the disk to go into hibernate. During installation, can this not be copied to '/usr/local/etc/rc.d/'? I think it would benefit a lot of Synology users.
Yes, that's the plan :-)
But we have to make the script dynamic. For example not everybody has the files on volume1.
We will include the file inside the sources and set placeholders that will be replaced on the installation.
I can't even find the current events.log
file on my NAS, checked the following as indicated on the OpenHAB doc site:
Nothing there, the two installation files are present though. Am I missing something here?
@DarkLite1 you found it here:
DS3615xs> ls -la /volume1/@appstore/openHAB2/userdata/logs/
drwxr-xr-x 2 openhab2 root 4096 Oct 22 20:38 .
drwxrwxr-x 9 openhab2 root 4096 Oct 22 20:38 ..
-rw-r--r-- 1 openhab2 users 0 Oct 22 20:38 audit.log
-rw-r--r-- 1 openhab2 users 0 Oct 22 20:38 events.log
-rw-r--r-- 1 openhab2 root 1377 Oct 22 20:38 openhab.log
We have added it in the README.md file: https://github.com/openhab/openhab-syno-spk/commit/6fd04a34a706edecaf031f4b99556474a0687ace
Thank you guys, appreciate it :+1:
I am not familiar with the installation process of an spk, so please be kind ;-) Is it possible to extract the install path into a config file -> http://wiki.bash-hackers.org/howto/conffile (eg. located in the openhab root) for the script? If a user decides to move his logs to another location, a simple edit of the config file would do the trick..
I am using the 2.3.0.005 release and the hard drives still go into hibernate mode. However I'm seeing that after a certain amount of time, the log files abruptly end and (that is what I suspect) my Z-wave binding does not initialize properly (my 'things' won't go online anymore).
My NAS is shut down every night and on startup the log files are not appended any more after the sudden ending of them. I do have set the log level to 'DEBUG', not sure if that is the cause. For OpenHAB to write again in (new) log files, I had to manually delete the files with an abrupt ending. Then after a period of time, the log files would end abruptly again.
I then moved my log files to an external USB drive again and since then I no longer have issues with the log files and my Z-wave 'things' are online.
openhab2 seems to permanently write to the log files, and, if used, to files for the persistence services.
This script creates a memory file system to avoid hard disk access