This commit is contained in:
mmetc 2021-11-02 09:19:22 +01:00 committed by GitHub
parent 4708b509e6
commit f10187bd6d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -72,7 +72,7 @@ func runCrowdsec(cConfig *csconfig.Config, parsers *parser.Parsers) error {
bucketWg := &sync.WaitGroup{}
bucketsTomb.Go(func() error {
bucketWg.Add(1)
/*restore as well previous state if present*/
/*restore previous state as well if present*/
if cConfig.Crowdsec.BucketStateFile != "" {
log.Warningf("Restoring buckets state from %s", cConfig.Crowdsec.BucketStateFile)
if err := leaky.LoadBucketsState(cConfig.Crowdsec.BucketStateFile, buckets, holders); err != nil {

View file

@ -6,7 +6,7 @@ if [ "$CONFIG_FILE" != "" ]; then
CS_CONFIG_FILE="$CONFIG_FILE"
fi
# regenerate lcaol agent credentials (ignore if agent is disabled)
# regenerate local agent credentials (ignore if agent is disabled)
if [ "$DISABLE_AGENT" == "" ] ; then
echo "Regenerate local agent credentials"
cscli -c "$CS_CONFIG_FILE" machines delete localhost
@ -20,7 +20,7 @@ if [ "$DISABLE_AGENT" == "" ] ; then
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
if [ "$DISABLE_LOCAL_API" == "" ] && [ "$AGENT_USERNAME" != "" ] && [ "$AGENT_PASSWORD" != "" ] ; then
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"
fi
exec crowdsec $ARGS
exec crowdsec $ARGS

View file

@ -109,7 +109,7 @@ func parser_visit(path string, f os.FileInfo, err error) error {
if err != nil {
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)
if os.IsNotExist(err) {
log.Infof("%s is a symlink to %s that doesn't exist, deleting symlink", path, hubpath)