mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
#43 new: bsd base support
This commit is contained in:
@@ -1,41 +1 @@
|
||||
import '../model/app/shell_func.dart';
|
||||
import 'build_data.dart';
|
||||
|
||||
const seperator = 'SrvBoxSep';
|
||||
const serverBoxDir = r'$HOME/.config/server_box';
|
||||
const shellPath = '$serverBoxDir/mobile_app.sh';
|
||||
|
||||
const statusCmds = [
|
||||
'date +%s',
|
||||
'cat /proc/net/dev',
|
||||
'cat /etc/os-release | grep PRETTY_NAME',
|
||||
'cat /proc/stat | grep cpu',
|
||||
'uptime',
|
||||
'cat /proc/net/snmp',
|
||||
'df -h',
|
||||
'cat /proc/meminfo',
|
||||
'cat /sys/class/thermal/thermal_zone*/type',
|
||||
'cat /sys/class/thermal/thermal_zone*/temp',
|
||||
'hostname',
|
||||
'cat /etc/redhat-release',
|
||||
];
|
||||
|
||||
const dockerCmds = [
|
||||
'docker version',
|
||||
'docker ps -a',
|
||||
'docker stats --no-stream',
|
||||
'docker image ls',
|
||||
];
|
||||
|
||||
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
|
||||
|
||||
${AppShellFuncType.shellScript}
|
||||
""";
|
||||
|
||||
final installShellCmd = "mkdir -p $serverBoxDir && "
|
||||
"echo '$shellCmd' > $shellPath && "
|
||||
"chmod +x $shellPath";
|
||||
|
||||
Reference in New Issue
Block a user