-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain_linux.go
More file actions
44 lines (36 loc) · 1.2 KB
/
main_linux.go
File metadata and controls
44 lines (36 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//go:build !windows
package main
import (
"fmt"
"log"
)
// isWindowsService always returns false on non-Windows platforms
func isWindowsService() bool {
return false
}
// handleInstall is not supported on non-Windows platforms.
func handleInstall(args []string) {
fmt.Println("Windows service installation is not supported on this platform")
fmt.Println("Use systemd or your system's service manager instead")
log.Fatal("Unsupported operation")
}
// handleRemove is not supported on non-Windows platforms.
func handleRemove() {
fmt.Println("Windows service removal is not supported on this platform")
log.Fatal("Unsupported operation")
}
// handleStart is not supported on non-Windows platforms.
func handleStart() {
fmt.Println("Windows service start is not supported on this platform")
log.Fatal("Unsupported operation")
}
// handleStop is not supported on non-Windows platforms.
func handleStop() {
fmt.Println("Windows service stop is not supported on this platform")
log.Fatal("Unsupported operation")
}
// runAsService is not supported on non-Windows platforms.
func runAsService(dataDir string) {
fmt.Println("Windows service mode is not supported on this platform")
log.Fatal("Unsupported operation")
}