typos (#1036)
This commit is contained in:
parent
4708b509e6
commit
f10187bd6d
|
@ -72,7 +72,7 @@ func runCrowdsec(cConfig *csconfig.Config, parsers *parser.Parsers) error {
|
||||||
bucketWg := &sync.WaitGroup{}
|
bucketWg := &sync.WaitGroup{}
|
||||||
bucketsTomb.Go(func() error {
|
bucketsTomb.Go(func() error {
|
||||||
bucketWg.Add(1)
|
bucketWg.Add(1)
|
||||||
/*restore as well previous state if present*/
|
/*restore previous state as well if present*/
|
||||||
if cConfig.Crowdsec.BucketStateFile != "" {
|
if cConfig.Crowdsec.BucketStateFile != "" {
|
||||||
log.Warningf("Restoring buckets state from %s", cConfig.Crowdsec.BucketStateFile)
|
log.Warningf("Restoring buckets state from %s", cConfig.Crowdsec.BucketStateFile)
|
||||||
if err := leaky.LoadBucketsState(cConfig.Crowdsec.BucketStateFile, buckets, holders); err != nil {
|
if err := leaky.LoadBucketsState(cConfig.Crowdsec.BucketStateFile, buckets, holders); err != nil {
|
||||||
|
|
|
@ -6,7 +6,7 @@ if [ "$CONFIG_FILE" != "" ]; then
|
||||||
CS_CONFIG_FILE="$CONFIG_FILE"
|
CS_CONFIG_FILE="$CONFIG_FILE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# regenerate lcaol agent credentials (ignore if agent is disabled)
|
# regenerate local agent credentials (ignore if agent is disabled)
|
||||||
if [ "$DISABLE_AGENT" == "" ] ; then
|
if [ "$DISABLE_AGENT" == "" ] ; then
|
||||||
echo "Regenerate local agent credentials"
|
echo "Regenerate local agent credentials"
|
||||||
cscli -c "$CS_CONFIG_FILE" machines delete localhost
|
cscli -c "$CS_CONFIG_FILE" machines delete localhost
|
||||||
|
@ -20,7 +20,7 @@ if [ "$DISABLE_AGENT" == "" ] ; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if lapi need to register automatically an agent
|
# Check if lapi needs to automatically register an agent
|
||||||
echo Check if lapi need to register automatically an agent
|
echo Check if lapi need to register automatically an agent
|
||||||
if [ "$DISABLE_LOCAL_API" == "" ] && [ "$AGENT_USERNAME" != "" ] && [ "$AGENT_PASSWORD" != "" ] ; then
|
if [ "$DISABLE_LOCAL_API" == "" ] && [ "$AGENT_USERNAME" != "" ] && [ "$AGENT_PASSWORD" != "" ] ; then
|
||||||
cscli -c "$CS_CONFIG_FILE" machines add $AGENT_USERNAME --password $AGENT_PASSWORD
|
cscli -c "$CS_CONFIG_FILE" machines add $AGENT_USERNAME --password $AGENT_PASSWORD
|
||||||
|
@ -96,4 +96,4 @@ if [ "$LEVEL_INFO" == "true" ] || [ "$LEVEL_INFO" == "TRUE" ]; then
|
||||||
ARGS="$ARGS -info"
|
ARGS="$ARGS -info"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec crowdsec $ARGS
|
exec crowdsec $ARGS
|
||||||
|
|
|
@ -109,7 +109,7 @@ func parser_visit(path string, f os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("unable to read symlink of %s", path)
|
return fmt.Errorf("unable to read symlink of %s", path)
|
||||||
}
|
}
|
||||||
//the symlink target doesn't exist, user might have remove ~/.hub/hub/...yaml without deleting /etc/crowdsec/....yaml
|
//the symlink target doesn't exist, user might have removed ~/.hub/hub/...yaml without deleting /etc/crowdsec/....yaml
|
||||||
_, err := os.Lstat(hubpath)
|
_, err := os.Lstat(hubpath)
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
log.Infof("%s is a symlink to %s that doesn't exist, deleting symlink", path, hubpath)
|
log.Infof("%s is a symlink to %s that doesn't exist, deleting symlink", path, hubpath)
|
||||||
|
|
Loading…
Reference in a new issue