feat(runtime): fix issue with install php runtime failed (#8230)

This commit is contained in:
zhengkunwang
2025-03-24 10:41:30 +00:00
committed by GitHub
parent a617424786
commit 0bddeef63e
8 changed files with 30 additions and 5 deletions
+9
View File
@@ -399,3 +399,12 @@ func RestartService(core, agent, reload bool) {
global.LOG.Errorf("restart 1panel service failed, err: %v, std: %s", err, std)
}
}
func GetSystemVersion(versionString string) string {
re := regexp.MustCompile(`v(\d+\.\d+\.\d+)`)
match := re.FindStringSubmatch(versionString)
if len(match) > 1 {
return match[1]
}
return ""
}