mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-09-30 08:01:02 +00:00
feat(runtime): fix issue with install php runtime failed (#8230)
This commit is contained in:
@@ -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 ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user