diff --git a/go-daemon/godaemon1.go b/go-daemon/godaemon1.go index 2096eb1..8de9a0d 100644 --- a/go-daemon/godaemon1.go +++ b/go-daemon/godaemon1.go @@ -28,9 +28,11 @@ func main() { log.Print("- - - - - - - - - - - - - - -") log.Print("daemon started") + log.Print("log1") for true { Info() + log.Print("log2") time.Sleep(100 * time.Millisecond) } diff --git a/go-daemon/info.go b/go-daemon/info.go index 30ea5e6..a0f2f46 100644 --- a/go-daemon/info.go +++ b/go-daemon/info.go @@ -21,11 +21,13 @@ func checkExists(path string) (bool, error) { } func Info() { + log.Print("log3") // A SAMPLE COMMAND FOR LOGGING OS INFORMATION TO A DEDICATED FILE userhome, err := os.UserHomeDir() // TODO $HOME is not defined while running as daemon !!! if err != nil { log.Fatal(err) } + log.Print("log4") // userhome := "/home/asandikci" // TEMPORARY configDir := userhome + "/.config/" + ProgramName + "/"