浏览代码

fix work with haproxy

coolsnowwolf 5 年之前
父节点
当前提交
8ebb2f2393
共有 2 个文件被更改,包括 4 次插入5 次删除
  1. 1 1
      luci-app-ssr-plus/Makefile
  2. 3 4
      luci-app-ssr-plus/root/etc/init.d/shadowsocksr

+ 1 - 1
luci-app-ssr-plus/Makefile

@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=luci-app-ssr-plus
 PKG_VERSION:=178
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 include $(INCLUDE_DIR)/package.mk
 

+ 3 - 4
luci-app-ssr-plus/root/etc/init.d/shadowsocksr

@@ -123,9 +123,7 @@ find_bin() {
 
 gen_config_file() {
 	local hostip=$(get_host_ip $(uci_get_by_name $1 server))
-	if [ "$hostip" == "127.0.0.1" ]; then
-		hostip=$(uci_get_by_name $1 ip)
-	else
+	if [ "$hostip" != "127.0.0.1" ]; then
 		uci_set_by_name $1 ip $hostip
 	fi
 	[ "$2" == "0" -a "$kcp_flag" == "1" ] && hostip="127.0.0.1"
@@ -141,6 +139,7 @@ gen_config_file() {
 		fastopen="false"
 	fi
 	local type=$(uci_get_by_name $1 type)
+	
 	case "$type" in
 	ss)
 		cat <<-EOF >$config_file
@@ -281,7 +280,7 @@ start_dns() {
 			purge_cache=off;
 			}
 		EOF
-		/usr/sbin/pdnsd -c /var/etc/pdnsd.conf &
+		/usr/sbin/pdnsd -c /var/etc/pdnsd.conf >/dev/null 2>&1 &
 	}
 	if [ "$ssr_dns" != "0" ]; then
 		case "$run_mode" in