mirror of
https://github.com/luxfi/cli.git
synced 2026-10-30 17:01:20 +00:00
- Update github.com/luxfi/netrunner v1.15.3 → v1.15.4 - Update github.com/luxfi/node v1.22.77 → v1.22.80 - Remove local replace directive for netrunner - Use published package versions for reproducible builds
32 lines
629 B
Go
32 lines
629 B
Go
// Copyright (C) 2022-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
// Package relayer provides Warp message relayer functionality
|
|
package relayer
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
)
|
|
|
|
// Cleanup cleans up relayer state files.
|
|
func Cleanup(runPath, logPath, storageDir string) error {
|
|
// Clean up run path
|
|
if runPath != "" {
|
|
pidFile := filepath.Join(runPath, "relayer.pid")
|
|
_ = os.Remove(pidFile)
|
|
}
|
|
|
|
// Clean up log path
|
|
if logPath != "" {
|
|
_ = os.RemoveAll(logPath)
|
|
}
|
|
|
|
// Clean up storage directory
|
|
if storageDir != "" {
|
|
_ = os.RemoveAll(storageDir)
|
|
}
|
|
|
|
return nil
|
|
}
|