2021-05-18 18:49:09 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"os"
|
2021-05-25 10:30:54 +00:00
|
|
|
"os/signal"
|
|
|
|
"syscall"
|
2021-05-18 18:49:09 +00:00
|
|
|
|
2023-06-23 13:09:44 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-s3-gw/cmd/s3-authmate/modules"
|
2021-05-18 18:49:09 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2023-06-23 13:09:44 +00:00
|
|
|
ctx, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)
|
2022-07-06 21:28:16 +00:00
|
|
|
|
2023-06-23 13:09:44 +00:00
|
|
|
if cmd, err := modules.Execute(ctx); err != nil {
|
|
|
|
cmd.PrintErrln("Error:", err.Error())
|
|
|
|
cmd.PrintErrf("Run '%v --help' for usage.\n", cmd.CommandPath())
|
2023-09-04 18:01:56 +00:00
|
|
|
os.Exit(modules.ExitCode(err))
|
2021-07-16 12:35:07 +00:00
|
|
|
}
|
2021-05-18 18:49:09 +00:00
|
|
|
}
|