luci-app-softethervpn: link real config to tmp

This commit is contained in:
CN_SZTL 2020-08-04 23:42:39 +08:00
parent 97ca06dfea
commit f74a78bc89
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 10 additions and 1 deletions

View File

@ -9,7 +9,7 @@ LUCI_TITLE:=LuCI support for SoftEtherVPN
LUCI_DEPENDS:=+zlib +libpthread +librt +libreadline +libncurses +libiconv-full +kmod-tun +libopenssl +softethervpn5-bridge +softethervpn5-client +softethervpn5-server
LUCI_PKGARCH:=all
PKG_VERSION:=1.0
PKG_RELEASE:=3
PKG_RELEASE:=4
include $(TOPDIR)/feeds/luci/luci.mk

View File

@ -32,6 +32,15 @@ start()
config_load softethervpn
config_foreach get_config softether
[ $enable -ne 1 ] && exit 0
[ -d /var/softethervpn ] || mkdir -p -m 0775 /var/softethervpn
[ -f /var/softethervpn/hamcore.se2 ] || ln -sf /usr/libexec/softethervpn/hamcore.se2 /var/softethervpn/
[ -f /var/softethervpn/lang.config ] || ln -sf /usr/libexec/softethervpn/lang.config /var/softethervpn/
[ -f /var/softethervpn/vpnserver ] || ln -sf /usr/libexec/softethervpn/vpnserver /var/softethervpn/
[ -f /var/softethervpn/vpn_server.config ] || ln -sf /usr/libexec/softethervpn/vpn_server.config /var/softethervpn/
logger -t 'softethervpn' "Starting softether vpnserver service."
/usr/bin/env LANG=en_US.UTF-8 /usr/libexec/softethervpn/vpnserver start > /dev/null 2>&1
fw3 reload