🤞 Sync 2025-12-11 10:03:47
This commit is contained in:
24
luci-nginxer/Makefile
Normal file
24
luci-nginxer/Makefile
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Copyright (C) 2008-2014 The LuCI Team <luci@lists.subsignal.org>
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=Nginxer
|
||||
LUCI_DESCRIPTION:=Standard OpenWrt set including full admin with ppp support and the default Bootstrap theme
|
||||
PKG_VERSION:=0.0.2
|
||||
PKG_RELEASE:=1
|
||||
LUCI_DEPENDS:=+luci-nginx
|
||||
|
||||
define Package/luci-nginxer/postrm
|
||||
#!/bin/sh
|
||||
/etc/init.d/uhttpd enable
|
||||
/etc/init.d/uhttpd start
|
||||
exit 0
|
||||
endef
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
18
luci-nginxer/root/etc/uci-defaults/50_luci-nginxer
Normal file
18
luci-nginxer/root/etc/uci-defaults/50_luci-nginxer
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
nginxer=$(uci get nginx.global.nginxer)
|
||||
if [ "$nginxer" != 1 ]; then
|
||||
uci delete nginx._redirect2ssl.return
|
||||
uci add_list nginx._redirect2ssl.include='restrict_locally'
|
||||
uci add_list nginx._redirect2ssl.include='conf.d/*.locations'
|
||||
uci set nginx._redirect2ssl.access_log='off; # logd openwrt'
|
||||
uci set nginx.global.nginxer='1'
|
||||
uci commit nginx
|
||||
|
||||
# fix firmware upload failed
|
||||
sed -i 's/client_max_body_size 128M;/client_max_body_size 256M;/g' /etc/nginx/uci.conf.template
|
||||
|
||||
# /etc/init.d/uhttpd running || /etc/init.d/uhttpd disable
|
||||
/etc/init.d/nginx reload
|
||||
fi
|
||||
exit 0
|
||||
Reference in New Issue
Block a user