Closed spali closed 7 years ago
I would suggest to place the a common lib folder (for the web server and internal scripts) directly in "/var/lib/homegear". That actually should work already. What do you think? The alternative would be to place the lib folder in the scripts or webroot directory and forbid direct access to it.
I prefer the first one, it's a cleaner seperation and you should include this folder by default in the script engine and webservers include path. Dont know if it would be handy to name it libphp or phpinclude or similar to make it clear its for php libraries.
I now set "include_path" in php.ini to ".;/var/lib/homegear/phpinclude" and "/var/lib/homegear/phpinclude" is automatically created on installation.
Separate scripts that are public for the API (i.e. openhab binding) from script library which shouldn't be shared with public API.
i.e.
scripts
folder for shareable scripts and alib
folder for libraries that can be used homegear internally.