Rename config files and database
This commit is contained in:
parent
78f98010aa
commit
b7d3f2ad0b
5 changed files with 5 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -6,4 +6,4 @@ tests/testing_bak/
|
|||
|
||||
include/sql/*.h
|
||||
|
||||
core.sqlite
|
||||
emgauwa-core.sqlite
|
||||
|
|
|
|||
16
emgauwa-core.ini
Normal file
16
emgauwa-core.ini
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[core]
|
||||
server-port = 5000
|
||||
database = core.sqlite
|
||||
content-dir = /usr/share/webapps/emgauwa
|
||||
not-found-file = 404.html
|
||||
not-found-file-mime = text/html
|
||||
not-found-content = 404 - NOT FOUND
|
||||
not-found-content-type = text/plain
|
||||
|
||||
: 4422 for testing; 4421 for dev-env; 4420 for testing-env; 4419 for prod-env
|
||||
discovery-port = 4421
|
||||
: 1886 for testing; 1885 for dev-env; 1884 for testing-env; 1883 for prod-env
|
||||
mqtt-port = 1885
|
||||
|
||||
log-level = debug
|
||||
log-file = stdout
|
||||
65
tests/emgauwa-controller-testing.ini
Normal file
65
tests/emgauwa-controller-testing.ini
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
[controller]
|
||||
name = new emgauwa device
|
||||
|
||||
: 4422 for testing; 4421 for dev-env; 4420 for testing-env; 4419 for prod-env
|
||||
discovery-port = 4422
|
||||
: 1886 for testing; 1885 for dev-env; 1884 for testing-env; 1883 for prod-env
|
||||
mqtt-port = 1886
|
||||
mqtt-host = localhost
|
||||
|
||||
relay-count = 10
|
||||
database = controller.sqlite
|
||||
log-level = debug
|
||||
log-file = stdout
|
||||
|
||||
[relay-0]
|
||||
driver = piface
|
||||
pin = 0
|
||||
inverted = 0
|
||||
|
||||
[relay-1]
|
||||
driver = piface
|
||||
pin = 1
|
||||
inverted = 0
|
||||
|
||||
[relay-2]
|
||||
driver = gpio
|
||||
pin = 5
|
||||
inverted = 1
|
||||
|
||||
[relay-3]
|
||||
driver = gpio
|
||||
pin = 4
|
||||
inverted = 1
|
||||
|
||||
[relay-4]
|
||||
driver = gpio
|
||||
pin = 3
|
||||
inverted = 1
|
||||
|
||||
[relay-5]
|
||||
driver = gpio
|
||||
pin = 2
|
||||
inverted = 1
|
||||
|
||||
[relay-6]
|
||||
driver = gpio
|
||||
pin = 1
|
||||
inverted = 1
|
||||
pulse-duration = 3
|
||||
|
||||
[relay-7]
|
||||
driver = gpio
|
||||
pin = 0
|
||||
inverted = 1
|
||||
pulse-duration = 3
|
||||
|
||||
[relay-8]
|
||||
driver = gpio
|
||||
pin = 16
|
||||
inverted = 1
|
||||
|
||||
[relay-9]
|
||||
driver = gpio
|
||||
pin = 15
|
||||
inverted = 1
|
||||
16
tests/emgauwa-core-testing.ini
Normal file
16
tests/emgauwa-core-testing.ini
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[core]
|
||||
server-port = 5000
|
||||
database = core.sqlite
|
||||
content-dir = .
|
||||
not-found-file = 404.html
|
||||
not-found-file-mime = text/html
|
||||
not-found-content = 404 - NOT FOUND
|
||||
not-found-content-type = text/plain
|
||||
|
||||
: 4422 for testing; 4421 for dev-env; 4420 for testing-env; 4419 for prod-env
|
||||
discovery-port = 4422
|
||||
: 1886 for testing; 1885 for dev-env; 1884 for testing-env; 1883 for prod-env
|
||||
mqtt-port = 1886
|
||||
|
||||
log-level = debug
|
||||
log-file = stdout
|
||||
|
|
@ -35,7 +35,7 @@ fi
|
|||
|
||||
echo "Emgauwa controller: $($EMGAUWA_CONTROLLER_EXE --version)"
|
||||
|
||||
$EMGAUWA_CONTROLLER_EXE start -c $source_dir/controller.testing.ini >$working_dir/controller.log 2>&1 &
|
||||
$EMGAUWA_CONTROLLER_EXE start -c $source_dir/emgauwa-controller-testing.ini >$working_dir/controller.log 2>&1 &
|
||||
controller_id=$!
|
||||
|
||||
cd $working_dir
|
||||
|
|
@ -43,14 +43,13 @@ cd $working_dir
|
|||
touch $working_dir/index.html
|
||||
|
||||
cp $1 $working_dir/core
|
||||
cp $source_dir/core.testing.ini $working_dir/core.ini
|
||||
|
||||
echo "=== invalids start (must exit) ===" >$working_dir/core.log
|
||||
$working_dir/core >>$working_dir/core.log 2>&1
|
||||
$working_dir/core INVALID_ACTION >>$working_dir/core.log 2>&1
|
||||
$working_dir/core -c $source_dir/emgauwa-core-testing-ini >>$working_dir/core.log 2>&1
|
||||
$working_dir/core -c $source_dir/emgauwa-core-testing-ini INVALID_ACTION >>$working_dir/core.log 2>&1
|
||||
|
||||
echo "=== valid start ===" >>$working_dir/core.log
|
||||
valgrind_emgauwa $working_dir/core start >>$working_dir/core.log 2>&1 &
|
||||
valgrind_emgauwa $working_dir/core -c $source_dir/emgauwa-core-testing.ini start >>$working_dir/core.log 2>&1 &
|
||||
core_id=$!
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue