diff --git a/include/target.mk b/include/target.mk index 60e789b7b..0f9c25cad 100644 --- a/include/target.mk +++ b/include/target.mk @@ -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 diff --git a/package/lean/luci-app-ramfree/Makefile b/package/lean/luci-app-ramfree/Makefile new file mode 100644 index 000000000..cddacda36 --- /dev/null +++ b/package/lean/luci-app-ramfree/Makefile @@ -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 + + diff --git a/package/lean/luci-app-ramfree/luasrc/controller/release_ram.lua b/package/lean/luci-app-ramfree/luasrc/controller/release_ram.lua new file mode 100644 index 000000000..17e95ce40 --- /dev/null +++ b/package/lean/luci-app-ramfree/luasrc/controller/release_ram.lua @@ -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 diff --git a/package/lean/luci-app-ramfree/po/zh-cn/release_ram.po b/package/lean/luci-app-ramfree/po/zh-cn/release_ram.po new file mode 100644 index 000000000..cff6f0289 --- /dev/null +++ b/package/lean/luci-app-ramfree/po/zh-cn/release_ram.po @@ -0,0 +1,2 @@ +msgid "Release Ram" +msgstr "ι‡Šζ”Ύε†…ε­˜"