Skip to content

Commit

Permalink
luci-app-kodexplorer: update php8 deps (coolsnowwolf#8445)
Browse files Browse the repository at this point in the history
deps update to php8 and nginx-ssl

Co-authored-by: Tianling Shen <[email protected]>
  • Loading branch information
Beginner-Go and 1715173329 authored Dec 18, 2021
1 parent dbf54e8 commit 9cfbc21
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package/lean/luci-app-kodexplorer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
include $(TOPDIR)/rules.mk

LUCI_TITLE:=LuCI support for KodExplorer
LUCI_DEPENDS:=+nginx +unzip +zoneinfo-asia +php7 +php7-fpm +php7-mod-curl +php7-mod-gd +php7-mod-iconv +php7-mod-json +php7-mod-mbstring +php7-mod-opcache +php7-mod-session +php7-mod-zip +php7-mod-sqlite3 +php7-mod-pdo +php7-mod-pdo-sqlite +php7-mod-pdo-mysql +php7-cgi +php7-mod-dom
LUCI_DEPENDS:=+nginx-ssl +unzip +zoneinfo-asia +php8 +php8-fpm +php8-mod-curl +php8-mod-gd +php8-mod-iconv +php8-mod-mbstring +php8-mod-opcache +php8-mod-session +php8-mod-zip +php8-mod-sqlite3 +php8-mod-pdo +php8-mod-pdo-sqlite +php8-mod-pdo-mysql +php8-cgi +php8-mod-dom
LUCI_PKGARCH:=all
PKG_VERSION:=13
PKG_VERSION:=14
PKG_DATE:=20210505

include $(TOPDIR)/feeds/luci/luci.mk
Expand Down
18 changes: 9 additions & 9 deletions package/lean/luci-app-kodexplorer/root/etc/init.d/kodexplorer
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ gen_nginx_config() {
location ~ \.php(.*)$ {
root $project_directory;
try_files \$uri = 404; # PHP 文件不存在返回404
fastcgi_pass unix:/var/run/php7-fpm.sock; # 通过 Unix 套接字执行 PHP
fastcgi_pass unix:/var/run/php8-fpm.sock; # 通过 Unix 套接字执行 PHP
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name; # 修复 Nginx fastcgi 漏洞
Expand Down Expand Up @@ -126,11 +126,11 @@ gen_php_config() {

cat <<-EOF >$PHP_FPM_CONFIG
[global]
pid = /var/run/kodexplorer_php7-fpm.pid
error_log = /var/log/kodexplorer_php7-fpm.log
pid = /var/run/kodexplorer_php8-fpm.pid
error_log = /var/log/kodexplorer_php8-fpm.log
[www]
user = root
listen = /var/run/php7-fpm.sock
listen = /var/run/php8-fpm.sock
listen.mode = 0666
listen.allowed_clients = 127.0.0.1
pm = dynamic
Expand All @@ -147,17 +147,17 @@ start() {
[ "$ENABLED" = "0" ] && return 0
mkdir -p $TEMP_PATH /var/log/nginx /var/lib/nginx
gen_php_config
/usr/bin/php-fpm -R -y $PHP_FPM_CONFIG -g "/var/run/php7-fpm.pid"
/usr/bin/php-fpm -R -y $PHP_FPM_CONFIG -g "/var/run/php8-fpm.pid"
gen_nginx_config $NGINX_CONFIG
/usr/sbin/nginx -c $NGINX_CONFIG >/dev/null 2>&1 &
}

stop() {
/usr/sbin/nginx -c $NGINX_CONFIG -s stop >/dev/null 2>&1 &
killall -9 php-fpm >/dev/null 2>&1 &
rm -f /var/run/kodexplorer_php7-fpm.pid
rm -f /var/log/kodexplorer_php7-fpm.log
rm -f /var/run/php7-fpm.sock
rm -f /var/run/kodexplorer_php8-fpm.pid
rm -f /var/log/kodexplorer_php8-fpm.log
rm -f /var/run/php8-fpm.sock
[ -f "$PHP_BACKUP_CONFIG" -a -f "$PHP_CONFIG" ] && {
rm -f $PHP_CONFIG
cp $PHP_BACKUP_CONFIG $PHP_CONFIG
Expand All @@ -168,4 +168,4 @@ stop() {
restart() {
stop
start
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ uci -q batch <<-EOF >/dev/null
commit ucitrack
EOF

/etc/init.d/php7-fpm disable && /etc/init.d/php7-fpm stop
rm -rf /tmp/luci-*cache
/etc/init.d/php8-fpm disable && /etc/init.d/php8-fpm stop
rm -rf /tmp/luci-*
exit 0

0 comments on commit 9cfbc21

Please sign in to comment.