Przeglądaj źródła

Merge pull request #250 from metachord/master

Remove unnecessary path parts
Solomon Hykes 12 lat temu
rodzic
commit
f5b458b1dc
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      container.go

+ 2 - 2
container.go

@@ -245,7 +245,7 @@ func (container *Container) Start() error {
 	params = append(params, "--", container.Path)
 	params = append(params, "--", container.Path)
 	params = append(params, container.Args...)
 	params = append(params, container.Args...)
 
 
-	container.cmd = exec.Command("/usr/bin/lxc-start", params...)
+	container.cmd = exec.Command("lxc-start", params...)
 
 
 	// Setup environment
 	// Setup environment
 	container.cmd.Env = append(
 	container.cmd.Env = append(
@@ -396,7 +396,7 @@ func (container *Container) Stop() error {
 	}
 	}
 
 
 	// 1. Send a SIGTERM
 	// 1. Send a SIGTERM
-	if output, err := exec.Command("/usr/bin/lxc-kill", "-n", container.Id, "15").CombinedOutput(); err != nil {
+	if output, err := exec.Command("lxc-kill", "-n", container.Id, "15").CombinedOutput(); err != nil {
 		log.Printf(string(output))
 		log.Printf(string(output))
 		log.Printf("Failed to send SIGTERM to the process, force killing")
 		log.Printf("Failed to send SIGTERM to the process, force killing")
 		if err := container.Kill(); err != nil {
 		if err := container.Kill(); err != nil {