op-packages/luci-app-vnt/Makefile
github-actions[bot] 9941499a61 🐤 Sync 2026-03-30 12:52:58
2026-03-30 12:52:58 +08:00

40 lines
986 B
Makefile
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# 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
PKG_VERSION:=1.2.16
PKG_RELEASE:=2
LUCI_TITLE:=LuCI support for vnt
LUCI_DEPENDS:=+kmod-tun +luci-compat
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-vnt
define Package/$(PKG_NAME)/prerm
#!/bin/sh
if [ -f /etc/config/vnt ] ; then
echo "备份vnt配置文件/etc/config/vnt到/tmp/vnt_backup"
echo "不重启设备之前再次安装luci-app-vnt 配置不丢失,不用重新配置"
mv -f /etc/config/vnt /tmp/vnt_backup
fi
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
chmod +x /etc/init.d/vnt
if [ -f /tmp/vnt_backup ] ; then
echo "发现vnt备份配置文件/tmp/vnt_backup开始恢复到/etc/config/vnt"
mv -f /tmp/vnt_backup /etc/config/vnt
echo "请前往 VPN - VNT 界面进行重启插件"
fi
endef
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature