diff --git a/cmd/csaf_aggregator/config.go b/cmd/csaf_aggregator/config.go index 7f0e160..973b139 100644 --- a/cmd/csaf_aggregator/config.go +++ b/cmd/csaf_aggregator/config.go @@ -32,7 +32,7 @@ const ( defaultWeb = "/var/www/html" defaultDomain = "https://example.com" defaultUpdateInterval = "on best effort" - defaultLockFile = "/var/csaf_aggregator/run.lock" + defaultLockFile = "/var/lock/csaf_aggregator/lock" ) type provider struct { diff --git a/cmd/csaf_aggregator/main.go b/cmd/csaf_aggregator/main.go index 1584d83..94270e7 100644 --- a/cmd/csaf_aggregator/main.go +++ b/cmd/csaf_aggregator/main.go @@ -46,7 +46,7 @@ func lock(lockFile *string, fn func() error) error { } if !locked { - return fmt.Errorf("cannot lock to file %s", *lockFile) + return fmt.Errorf("cannot aquire file lock at %s. Maybe the CSAF aggregator is already running?", *lockFile) } defer fl.Unlock() return fn() diff --git a/docs/csaf_aggregator.md b/docs/csaf_aggregator.md index 69eb9c5..3c572db 100644 --- a/docs/csaf_aggregator.md +++ b/docs/csaf_aggregator.md @@ -91,7 +91,7 @@ openpgp_private_key // OpenPGP private key (must have no passphrase set, if // you want to be able to run unattended, e.g. via cron.) openpgp_public_key // OpenPGP public key passphrase // passphrase of the OpenPGP key -lock_file // path to lockfile, to stop other instances if one is not done (default:/var/csaf_aggregator/run.lock, disable by setting it to "") +lock_file // path to lockfile, to stop other instances if one is not done (default:/var/lock/csaf_aggregator/lock, disable by setting it to "") interim_years // limiting the years for which interim documents are searched (default 0) verbose // print more diagnostic output, e.g. https requests (default false) allow_single_provider // debugging option (default false) diff --git a/docs/examples/aggregator.toml b/docs/examples/aggregator.toml index ac73cc4..597144c 100644 --- a/docs/examples/aggregator.toml +++ b/docs/examples/aggregator.toml @@ -1,6 +1,6 @@ workers = 2 folder = "/var/csaf_aggregator" -lock_file = "/var/csaf_aggregator/run.lock" +lock_file = "/var/lock/csaf_aggregator/lock" web = "/var/csaf_aggregator/html" domain = "https://localhost:9443" rate = 10.0