-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsrvRunResults.go
46 lines (28 loc) · 878 Bytes
/
srvRunResults.go
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
45
46
package main
// Function displays whether the service task was pwerformed
// successfully or unsuccessfully
func run_results(taskRunMsg string, theTask string) {
// Debug: fmt.Println(taskRunMsg + " " + theTask)
// Print message based on the status of running the command
switch taskRunMsg {
case "Success":
if theTask == "status" {
infoMsg("sshwireguard is running")
} else {
successMsg("sshwireguard was " + theTask)
}
case "Error":
if theTask == "status" {
infoMsg("sshwireguard is not running")
// Message when manually stopping the VPN service
} else if theTask == "stopped" {
successMsg("sshwireguard was stopped")
// Message when the VPN service was running, but did not stop
} else {
errorMsg("sshwireguard was not " + theTask + ". Please try again.")
}
default:
infoMsg("Nothing to do!rr")
errorOne()
}
}