This commit is contained in:
lollipopkit
2023-08-08 18:38:56 +08:00
parent d35d106ad4
commit 9fb738eda1
5 changed files with 32 additions and 29 deletions

View File

@@ -67,13 +67,16 @@ String? _parseUpTime(String raw) {
}
String? _parseSysVer(String raw, String hostname, String rawRhel) {
if (!rawRhel.contains('No such file')) {
return rawRhel;
try {
final s = raw.split('=');
if (s.length == 2) {
return s[1].replaceAll('"', '').replaceFirst('\n', '');
}
} catch (e) {
if (!rawRhel.contains('cat: /etc/redhat-release:')) {
return rawRhel;
}
if (hostname.isNotEmpty) return hostname;
}
final s = raw.split('=');
if (s.length == 2) {
return s[1].replaceAll('"', '').replaceFirst('\n', '');
}
if (hostname.isNotEmpty) return hostname;
return null;
}

View File

@@ -2,8 +2,8 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 453;
static const int build = 454;
static const String engine = "3.10.6";
static const String buildAt = "2023-08-08 17:41:45.597966";
static const int modifications = 1;
static const String buildAt = "2023-08-08 17:50:11.695696";
static const int modifications = 3;
}

View File

@@ -32,7 +32,7 @@ final shellCmd = """
# Script for app `${BuildData.name} v1.0.${BuildData.build}`
# Delete this file while app is running will cause app crash
export LANG="en_US.UTF-8"
export LANG=en_US.UTF-8
${AppShellFuncType.shellScript}
""";