Net tap cleanup & proper error exit handling

This commit is contained in:
AlexSSD7 2023-08-31 20:10:26 +01:00
commit 3a56fb9db8
3 changed files with 51 additions and 42 deletions

View file

@ -16,7 +16,7 @@ var cleanCmd = &cobra.Command{
Use: "clean",
Short: "Remove the Linsk data directory.",
Run: func(cmd *cobra.Command, args []string) {
store := createStore()
store := createStoreOrExit()
if nettap.Available() {
tm, err := nettap.NewTapManager(slog.With("caller", "nettap-manager"))