Skip to content

Commit 6afb815

Browse files
committed
fix get/set selected config
1 parent d41ff97 commit 6afb815

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

luci-app-neko/htdocs/nekoclash/configs.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@
22
include './cfg.php';
33

44
$dirPath = "$neko_dir/config";
5-
$tmpPath = "$neko_www/lib/selected_config.txt";
65
$arrFiles = array();
76
$arrFiles = glob("$dirPath/*.yaml");
87

98
if(isset($_POST['clashconfig'])){
109
$dt = $_POST['clashconfig'];
11-
shell_exec("echo $dt > $tmpPath");
10+
shell_exec("uci set neko.cfg.selected_config='$dt' && uci commit neko");
1211
$selected_config = $dt;
1312
}
1413
if(isset($_POST['neko'])){

0 commit comments

Comments
 (0)