starting work on update
This commit is contained in:
parent
6a08e4ed7f
commit
332b1d8772
|
@ -80,7 +80,7 @@ If you want to be able to restart/stop your container and keep the same DB `-v /
|
||||||
* `TEST_MODE` - Only test configs (default: `false`) : `-e TEST_MODE="<true|false>"`
|
* `TEST_MODE` - Only test configs (default: `false`) : `-e TEST_MODE="<true|false>"`
|
||||||
* `TZ` - Set the [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to ensure logs have a local timestamp.
|
* `TZ` - Set the [timezone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to ensure logs have a local timestamp.
|
||||||
* `DISABLE_AGENT` - Only test configs (default: `false`) : `-e DISABLE_AGENT="<true|false>"`
|
* `DISABLE_AGENT` - Only test configs (default: `false`) : `-e DISABLE_AGENT="<true|false>"`
|
||||||
* `DISABLE_LOCAL_API` - Disable local API (default: `false`) : `-e DISABLE_API="<true|false>"`
|
* `DISABLE_LOCAL_API` - Disable local API (default: `false`) : `-e DISABLE_LOCAL_API="<true|false>"`
|
||||||
* `DISABLE_ONLINE_API` - Disable Online API registration for signal sharing (default: `false`) : `-e DISABLE_ONLINE_API="<true|false>"`
|
* `DISABLE_ONLINE_API` - Disable Online API registration for signal sharing (default: `false`) : `-e DISABLE_ONLINE_API="<true|false>"`
|
||||||
* `LEVEL_TRACE` - Trace-level (VERY verbose) on stdout (default: `false`) : `-e LEVEL_TRACE="<true|false>"`
|
* `LEVEL_TRACE` - Trace-level (VERY verbose) on stdout (default: `false`) : `-e LEVEL_TRACE="<true|false>"`
|
||||||
* `LEVEL_DEBUG` - Debug-level on stdout (default: `false`) : `-e LEVEL_DEBUG="<true|false>"`
|
* `LEVEL_DEBUG` - Debug-level on stdout (default: `false`) : `-e LEVEL_DEBUG="<true|false>"`
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Check if the container has already been started
|
# Check if the container has already been started
|
||||||
cscli machines list | grep 127.0.0.1
|
if [ "$DISABLE_AGENT" == "" ] ; then
|
||||||
if [ $? == 1 ]; then
|
if [ "$LOCAL_API_URL" != "" ] ; then
|
||||||
cscli machines add --force --auto -f /etc/crowdsec/local_api_credentials.yaml
|
cscli lapi register --url $LOCAL_API_URL
|
||||||
|
fi
|
||||||
|
cscli machines list | grep localhost
|
||||||
|
if [ $? == 1 ]; then
|
||||||
|
cscli lapi register --machine localhost
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# registration to online API for signal push
|
# registration to online API for signal push
|
||||||
|
@ -58,7 +63,7 @@ fi
|
||||||
if [ "$DISABLE_AGENT" == "true" ] || [ "$DISABLE_AGENT" == "TRUE" ]; then
|
if [ "$DISABLE_AGENT" == "true" ] || [ "$DISABLE_AGENT" == "TRUE" ]; then
|
||||||
ARGS="$ARGS -no-cs"
|
ARGS="$ARGS -no-cs"
|
||||||
fi
|
fi
|
||||||
if [ "$DISABLE_API" == "true" ] || [ "$DISABLE_API" == "TRUE" ]; then
|
if [ "$DISABLE_LOCAL_API" == "true" ] || [ "$DISABLE_LOCAL_API" == "TRUE" ]; then
|
||||||
ARGS="$ARGS -no-api"
|
ARGS="$ARGS -no-api"
|
||||||
fi
|
fi
|
||||||
if [ "$LEVEL_TRACE" == "true" ] || [ "$LEVEL_TRACE" == "TRUE" ]; then
|
if [ "$LEVEL_TRACE" == "true" ] || [ "$LEVEL_TRACE" == "TRUE" ]; then
|
||||||
|
|
Loading…
Reference in a new issue