Added Dockerfile for building server images
This commit is contained in:
@@ -2,6 +2,7 @@ package monitor
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
@@ -44,6 +45,8 @@ func (s *Service) LoadScripts() error {
|
||||
func (s *Service) GetLastOutput(command string) (string, error) {
|
||||
args := strings.Fields(command)
|
||||
|
||||
log.Printf("Running script %q with args %v", args[0], args[1:])
|
||||
|
||||
scriptPath := s.scriptPaths[args[0]]
|
||||
|
||||
cmd := exec.Command(scriptPath, args[1:]...)
|
||||
|
||||
Reference in New Issue
Block a user