service properties to constants

This commit is contained in:
Andrey Meshkov
2019-02-05 14:21:07 +03:00
parent aab8da4c7c
commit 93ea27077f
3 changed files with 14 additions and 11 deletions

View File

@@ -9,8 +9,11 @@ import (
)
const (
launchdStdoutPath = "/var/log/AdGuardHome.stdout.log"
launchdStderrPath = "/var/log/AdGuardHome.stderr.log"
launchdStdoutPath = "/var/log/AdGuardHome.stdout.log"
launchdStderrPath = "/var/log/AdGuardHome.stderr.log"
serviceName = "AdGuardHome"
serviceDisplayName = "AdGuard Home service"
serviceDescription = "AdGuard Home: Network-level blocker"
)
// Represents the program that will be launched by a service or daemon
@@ -51,9 +54,9 @@ func handleServiceControlAction(action string) {
log.Fatal("Unable to find the path to the current directory")
}
svcConfig := &service.Config{
Name: "AdGuardHome",
DisplayName: "AdGuard Home service",
Description: "AdGuard Home: Network-level blocker",
Name: serviceName,
DisplayName: serviceDisplayName,
Description: serviceDescription,
WorkingDirectory: pwd,
Arguments: []string{"-s", "run"},
}