mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
add a free ram button in luci
This commit is contained in:
parent
8d67f77ff4
commit
024ba9ed0c
@ -17,7 +17,7 @@ DEFAULT_PACKAGES:=base-files libc libgcc busybox dropbear mtd uci opkg netifd fs
|
||||
iptables-mod-nat-extra kmod-nf-nathelper kmod-nf-nathelper-extra kmod-ipt-raw kmod-macvlan kmod-nft-offload \
|
||||
default-settings luci luci-app-ddns luci-app-sqm luci-app-upnp luci-app-adbyby-plus luci-app-autoreboot \
|
||||
luci-app-filetransfer luci-app-ssr-plus luci-app-usb-printer luci-app-vsftpd ddns-scripts_aliyun luci-app-xlnetacc \
|
||||
luci-app-pptp-server luci-app-ipsec-vpnd luci-app-vlmcsd luci-app-wifischedule luci-app-wol \
|
||||
luci-app-pptp-server luci-app-ipsec-vpnd luci-app-vlmcsd luci-app-wifischedule luci-app-wol luci-app-ramfree \
|
||||
luci-app-sfe luci-app-flowoffload luci-app-nlbwmon luci-app-wrtbwmon
|
||||
# For nas targets
|
||||
DEFAULT_PACKAGES.nas:=block-mount fdisk lsblk mdadm automount autosamba
|
||||
|
17
package/lean/luci-app-ramfree/Makefile
Normal file
17
package/lean/luci-app-ramfree/Makefile
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright (C) 2016 Openwrt.org
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=luci-app-ramfree
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_VERSION:=1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
module("luci.controller.release_ram",package.seeall)
|
||||
|
||||
function index()
|
||||
entry({"admin","status","release_ram"}, call("release_ram"), _("Release Ram"), 9999)
|
||||
end
|
||||
function release_ram()
|
||||
luci.sys.call("sync && echo 3 > /proc/sys/vm/drop_caches")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/status"))
|
||||
end
|
2
package/lean/luci-app-ramfree/po/zh-cn/release_ram.po
Normal file
2
package/lean/luci-app-ramfree/po/zh-cn/release_ram.po
Normal file
@ -0,0 +1,2 @@
|
||||
msgid "Release Ram"
|
||||
msgstr "释放内存"
|
Loading…
Reference in New Issue
Block a user