summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/main.go b/main.go
index ab7717c..3368042 100644
--- a/main.go
+++ b/main.go
@@ -55,6 +55,31 @@ func main() {
for pkg, version := range installedPackages {
fmt.Printf("%s: %s\n", pkg, version)
}
+
+ // Detect the Linux distribution
+ distro := detectDistro()
+ if distro == "" {
+ fmt.Println("Unable to detect Linux distribution.")
+ return
+ }
+
+ fmt.Printf("Detected distribution: %s\n", distro)
+
+ // Get the list of installed packages for the detected distro
+ packages, err := getPackageList(distro)
+ if err != nil {
+ fmt.Println("Error:", err)
+ return
+ }
+
+ // Print the installed packages
+ fmt.Println("Installed Packages:")
+ for _, pkg := range packages {
+ if pkg != "" {
+ fmt.Println(pkg)
+ }
+ }
+
go NewWatchdog()
startHTTP()