2021-05-18 21:49:09 +03:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"os"
|
2021-05-25 13:30:54 +03:00
|
|
|
"os/signal"
|
|
|
|
"syscall"
|
2021-05-18 21:49:09 +03:00
|
|
|
|
2023-06-23 16:09:44 +03:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-s3-gw/cmd/s3-authmate/modules"
|
2021-05-18 21:49:09 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2023-06-23 16:09:44 +03:00
|
|
|
ctx, _ := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM, syscall.SIGHUP)
|
2022-07-07 01:28:16 +04:00
|
|
|
|
2023-06-23 16:09:44 +03: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 21:01:56 +03:00
|
|
|
os.Exit(modules.ExitCode(err))
|
2021-07-16 15:35:07 +03:00
|
|
|
}
|
2021-05-18 21:49:09 +03:00
|
|
|
}
|