parent
c99f97eb6f
commit
52090ae565
|
@ -37,22 +37,23 @@ Scripts should be placed in the `${OPENHAB_CONF}/automation/jsr223/` directory.
|
||||||
This directory will vary, [based on the type of openHAB installation used](https://www.openhab.org/docs/installation/linux.html#installation).
|
This directory will vary, [based on the type of openHAB installation used](https://www.openhab.org/docs/installation/linux.html#installation).
|
||||||
For example, Linux installations created with a package installer will use `/etc/openhab2/automation/jsr223/`, and manual installations will use `/opt/openhab2/conf/automation/jsr223/`.
|
For example, Linux installations created with a package installer will use `/etc/openhab2/automation/jsr223/`, and manual installations will use `/opt/openhab2/conf/automation/jsr223/`.
|
||||||
|
|
||||||
When openHAB starts, scripts will be loaded in an order based on their file name and path.
|
When openHAB starts, scripts will be loaded in an order based on their file name.
|
||||||
|
If the scripts have the same name, which should rarely happen, the parent directories will be considered in the sort.
|
||||||
For example, with the following scripts and directory structure...
|
For example, with the following scripts and directory structure...
|
||||||
|
|
||||||
```text
|
```text
|
||||||
├── automation/jsr223
|
├── automation/jsr223
|
||||||
│ ├── 00
|
│ ├── dir1
|
||||||
│ │ ├── 00_00.py
|
│ │ ├── 001_script.py
|
||||||
│ │ └── 01_00.py
|
│ │ └── script.py
|
||||||
│ ├── 00.py
|
│ ├── 001_script.py
|
||||||
│ ├── 01
|
│ ├── dir2
|
||||||
│ │ ├── 00_01.py
|
│ │ ├── 002_script.py
|
||||||
│ │ └── 01_01.py
|
│ │ └── script.py
|
||||||
│ └── 01.py
|
│ └── script.py
|
||||||
```
|
```
|
||||||
|
|
||||||
... the load order will be: `00.py`, `00/00_00.py`, `00/01_00.py`, `01.py`, `01/00_01.py`, `01/01_01.py`.
|
... the load order will be: `/001_script.py`, `/dir1/001_script.py`, `/dir2/002_script.py`, `/script.py`, `/dir1/script.py`, `/dir2/script.py`.
|
||||||
|
|
||||||
<a name="presets"></a>
|
<a name="presets"></a>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue