mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-15 04:34:34 +01:00
feat: custom shell script install path (#545)
This commit is contained in:
@@ -26,7 +26,7 @@ enum NetViewType {
|
||||
NetViewType.speed => l10n.speed,
|
||||
};
|
||||
|
||||
/// If no device is specified, return the cached value (only real devices,
|
||||
/// If no device is specified, return the cached value (only real devices,
|
||||
/// such as ethX, wlanX...).
|
||||
(String, String) build(ServerStatus ss, {String? dev}) {
|
||||
final notSepcifyDev = dev == null || dev.isEmpty;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:server_box/core/extension/context/locale.dart';
|
||||
import 'package:server_box/data/provider/server.dart';
|
||||
|
||||
import 'package:server_box/data/res/build_data.dart';
|
||||
import 'package:server_box/data/model/server/system.dart';
|
||||
@@ -29,6 +30,9 @@ enum ShellFunc {
|
||||
/// Default is [scriptDirTmp]/[scriptFile], if this path is not accessible,
|
||||
/// it will be changed to [scriptDirHome]/[scriptFile].
|
||||
static String getScriptDir(String id) {
|
||||
final customScriptDir =
|
||||
ServerProvider.pick(id: id)?.value.spi.custom?.scriptDir;
|
||||
if (customScriptDir != null) return customScriptDir;
|
||||
return _scriptDirMap.putIfAbsent(id, () {
|
||||
return scriptDirTmp;
|
||||
});
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 1068;
|
||||
static const int build = 1069;
|
||||
static const int script = 57;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user