More straightforward example rules_refresh.sh (#820)

* More straightforward example rules_refresh.sh

* Use environment var for config directory location

Signed-off-by: Dmitry Kann <yktooo@gmail.com> (github: yktoo)
pull/824/head
Dmitry Kann 2018-12-04 12:54:07 +01:00 committed by Brad Gilmer
parent 018079c083
commit 90ff8b7b04
1 changed files with 1 additions and 6 deletions

View File

@ -246,12 +246,7 @@ Create a refresh script `$OPENHAB_CONF/rules/rules_refresh.sh` and make it execu
#!/bin/bash
#This script is called by openHAB after the persistence service has started
sleep 5
cd [full_path_to_openhab_config_directory]/rules
FileList="$(find *.rules | grep -v refresh.rules)"
for File in $FileList
do
touch $File
done
find "$OPENHAB_CONF/rules" -type f -name '*.rules' -not -name refresh.rules | xargs touch
```
The script waits for five seconds and then touches all `*.rules` files (except `refresh.rules`).