Homegear / Homegear

Interface your smart home devices with your home automation software or your own control scripts.
https://homegear.eu
Other
122 stars 38 forks source link

[Enhancement][low-prio]lib directory for non public scripts #278

Closed spali closed 7 years ago

spali commented 7 years ago

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 a lib folder for libraries that can be used homegear internally.

hfedcba commented 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.

spali commented 7 years ago

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.

hfedcba commented 7 years ago

I now set "include_path" in php.ini to ".;/var/lib/homegear/phpinclude" and "/var/lib/homegear/phpinclude" is automatically created on installation.