mirror of
https://github.com/kiddin9/openwrt-packages.git
synced 2025-01-09 10:27:29 +08:00
Create luci-app-nekoclash.patch
This commit is contained in:
parent
dd74486ace
commit
16b80199bd
50
.github/diy/patches/luci-app-nekoclash.patch
vendored
Normal file
50
.github/diy/patches/luci-app-nekoclash.patch
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
--- a/luci-app-nekoclash/root/etc/uci-defaults/99_neko
|
||||
+++ b/luci-app-nekoclash/root/etc/uci-defaults/99_neko
|
||||
@@ -24,11 +24,31 @@ fi
|
||||
echo "[ `date +%T` ] - Checking Files"
|
||||
|
||||
files_check() {
|
||||
- uci set uhttpd.main.index_page='index.php'
|
||||
- uci set uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
|
||||
- uci commit uhttpd
|
||||
+ if [ -n "$(command -v nginx)" ];then
|
||||
+cat << 'EOF' > /etc/nginx/conf.d/nekoclash.locations
|
||||
+location /nekoclash {
|
||||
+ alias /www/nekoclash;
|
||||
+ index index.php index.html index.htm;
|
||||
|
||||
- /etc/init.d/uhttpd restart
|
||||
+ location ~ \.php$ {
|
||||
+ if (!-f $request_filename) {
|
||||
+ return 404;
|
||||
+ }
|
||||
+ fastcgi_pass 127.0.0.1:1026;
|
||||
+ fastcgi_index index.php;
|
||||
+ include fastcgi_params;
|
||||
+ fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
+ }
|
||||
+}
|
||||
+EOF
|
||||
+ /etc/init.d/nginx restart
|
||||
+ else
|
||||
+ uci set uhttpd.main.index_page='index.php'
|
||||
+ uci set uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
|
||||
+ uci commit uhttpd
|
||||
+
|
||||
+ /etc/init.d/uhttpd restart
|
||||
+ fi
|
||||
|
||||
case "$arch" in
|
||||
aarch64)
|
||||
|
||||
--- a/luci-app-nekoclash/Makefile
|
||||
+++ b/luci-app-nekoclash/Makefile
|
||||
@@ -16,7 +16,7 @@ define Package/$(PKG_NAME)
|
||||
SUBMENU:=3. Applications
|
||||
TITLE:=LuCI support for mihomo
|
||||
PKGARCH:=all
|
||||
- DEPENDS:=+kmod-tun +bash +curl +jq +php8 +php8-cgi +php8-mod-curl
|
||||
+ DEPENDS:=+kmod-tun +bash +curl +jq +php8 +php8-fastcgi +php8-cgi +php8-mod-curl
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
Loading…
Reference in New Issue
Block a user