Mini Shell

Direktori : /usr/share/l.v.e-manager/panelless-version/example/
Upload File :
Current File : //usr/share/l.v.e-manager/panelless-version/example/readme.md

# How to integrate to panel

1. Configure `/opt/cpvendor/etc/integration.ini`

Set path

```
[lvemanager_config]
ui_user_info =  /panel_path/user_info.php
base_path = /panel_path/lvemanager
base_uri = /lvemanager
```
For PHP version of integration, the vendor can set `vendor_php` option if he needs to run specific logic before initialize the plugin (for example drop permission).
The `vendor_php` is the full path to the vendor's file `vendor.php`.

Example:
```
[lvemanager_config]
...
vendor_php = /opt/cpvendor/etc/vendor.php
```
2. Install lvemanager package. Installation script copying lvemanager files to /panel_path/lvemanager directory. And will copy every update.
3. Make sure that configure php-fpm for panel run all scripts as root
enable `exec` and `shell_exec` functions for this site

### Example of integration.ini for CWP

```
[lvemanager_config]
ui_user_info = /usr/share/l.v.e-manager/panelless-version/example/user_info.php
base_path = /usr/local/cwpsrv/htdocs/admin/admin/lvemanager
```

After installing lvemanager you can open SPA application by url (admin/lvemanager)

You need to add `/opt/cpvendor/etc/` to open_basedir for giving access to integration configuration file for php interpreter.

https://cp.domain.com:2031/admin/lvemanager/

## user_info.php
This example of file which return information about current user (not it get information by running `whoami` command)
It's can be any language script with shebang and exec permissions.


## Example of integration to any page

You can create your own php file with wrapper for lvemanager panel.
Example you can find in  `/usr/share/l.v.e-manager/panelless-version/lvemanager/index.php`

Zerion Mini Shell 1.0