This commit is contained in:
2024-04-03 20:39:20 +03:00
parent 9832e01049
commit 0811cea833
9 changed files with 95 additions and 61 deletions
+9 -7
View File
@@ -10,13 +10,14 @@ import (
"log"
"time"
"github.com/kardianos/service"
"git.company.lan/gopkg/service"
)
var logger service.Logger
// Program structures.
// Define Start and Stop methods.
//
// Define Start and Stop methods.
type program struct {
exit chan struct{}
}
@@ -54,11 +55,12 @@ func (p *program) Stop(s service.Service) error {
}
// Service setup.
// Define service config.
// Create the service.
// Setup the logger.
// Handle service controls (optional).
// Run the service.
//
// Define service config.
// Create the service.
// Setup the logger.
// Handle service controls (optional).
// Run the service.
func main() {
svcFlag := flag.String("service", "", "Control the system service.")
flag.Parse()