Added Dockerfile for building server images

This commit is contained in:
2022-07-06 19:45:25 +02:00
parent 8e86943b83
commit 9fd04082f7
5 changed files with 36 additions and 3 deletions
+3
View File
@@ -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:]...)