Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
woniuzfb committed Jul 17, 2021
1 parent afcf42d commit cd412c8
Show file tree
Hide file tree
Showing 4 changed files with 232 additions and 198 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tv c <en|zh_CN|...> # change/update language
## 一键管理 nginx 脚本

``` bash
wget -q https://git.io/nx.sh && bash nx.sh
wget -q https://woniuzfb.github.io/iptv/nx.sh && bash nx.sh

nx # 打开 Nginx 管理面板

Expand All @@ -43,7 +43,7 @@ nx # 打开 Nginx 管理面板
## 一键管理 openresty 脚本

``` bash
wget -q https://git.io/or.sh && bash or.sh
wget -q https://woniuzfb.github.io/iptv/or.sh && bash or.sh

or # 打开 OpenResty 管理面板

Expand All @@ -54,7 +54,7 @@ or # 打开 OpenResty 管理面板
## 一键管理 xray 脚本

``` bash
wget -q https://git.io/xray.sh && bash xray.sh
wget -q https://woniuzfb.github.io/iptv/xray.sh && bash xray.sh

x # 打开 xray 管理面板

Expand All @@ -65,8 +65,8 @@ x # 打开 xray 管理面板
## 一键管理 v2ray 脚本

``` bash
wget -q https://git.io/V2.sh && bash V2.sh
# git.io/V2.sh(大写的 V)
wget -q https://woniuzfb.github.io/iptv/V2.sh && bash V2.sh
# woniuzfb.github.io/iptv/V2.sh(大写的 V)

v2 # 打开 v2ray 管理面板

Expand All @@ -77,7 +77,7 @@ v2 # 打开 v2ray 管理面板
## 一键管理 armbian 脚本

``` bash
wget -q https://git.io/arm.sh && bash arm.sh
wget -q https://woniuzfb.github.io/iptv/arm.sh && bash arm.sh

arm # 打开 Armbian 管理面板

Expand All @@ -96,7 +96,7 @@ arm # 打开 Armbian 管理面板
## 一键管理 proxmox ve 脚本

``` bash
wget -q https://git.io/pve.sh && bash pve.sh
wget -q https://woniuzfb.github.io/iptv/pve.sh && bash pve.sh

pve # 打开 Proxmox VE 管理面板

Expand All @@ -113,7 +113,7 @@ pve # 打开 Proxmox VE 管理面板
## 一键管理 ibm cloud foundry 脚本

``` bash
wget -q https://git.io/ibm.sh && bash ibm.sh
wget -q https://woniuzfb.github.io/iptv/ibm.sh && bash ibm.sh

ibm # 打开 ibm CF 管理面板

Expand All @@ -128,7 +128,7 @@ ibm x # 打开 ibm xray APP 管理面板
## 一键管理 cloudflare partner,workers 脚本

``` bash
wget -q https://git.io/cf.sh && bash cf.sh
wget -q https://woniuzfb.github.io/iptv/cf.sh && bash cf.sh

cf # 打开 cloudflare partner,workers 管理面板

Expand Down Expand Up @@ -156,7 +156,7 @@ Mac/Linux 一键获取最优 IP 可以用脚本 [cloudflare-fping](https://githu
### [演示](https://mtime.info/)

``` bash
wget -q https://git.io/iptv.sh && bash iptv.sh
wget -q https://woniuzfb.github.io/iptv/iptv.sh && bash iptv.sh

tv # 打开 iptv 管理面板

Expand Down
89 changes: 53 additions & 36 deletions docs/iptv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ LocaleFix()
yum -y install glibc-common glibc-locale-source glibc-all-langpacks glibc-langpack-en glibc-langpacks-zh langpacks-zh_CN >/dev/null 2>&1 || true
else
[ "$release" == "deb" ] && DebFixSources
AptUpdate
if [[ ! -x $(command -v locale-gen) ]]
then
AptUpdate
if ! apt-get -y install locales >/dev/null 2>&1
then
Println "${red}[ERROR]${normal} locales installation failed\n" && exit 1
Expand Down Expand Up @@ -24533,7 +24533,7 @@ NginxUpdateCFIBMip()
Println "$info 更新 ip ..."

printf '%s' "#!/bin/bash
echo '#Cloudflare' > $nginx_prefix/conf/cloudflare_ip.conf;
echo -e 'set_real_ip_from 127.0.0.0/24;\n#Cloudflare' > $nginx_prefix/conf/cloudflare_ip.conf;
ibm_ips=(
50.22.0.0/16
50.23.0.0/16
Expand Down Expand Up @@ -39183,6 +39183,7 @@ set expandtab
autocmd BufRead,BufNewFile *.conf setfiletype conf
filetype indent off
" > ~/.vimrc
DepInstall git
Println "$info vimrc 设置完成, 请在 vim 下执行 PlugInstall\n"
else
Println "$error 无法连接服务器, 请稍后再试\n"
Expand Down Expand Up @@ -40211,6 +40212,7 @@ WantedBy=multi-user.target" > /etc/systemd/system/$nginx_name.service
inquirer text_input "输入 ipv4 分流目标 地址+端口${acme_tip:-}${ssh_tip:-}: " mmproxy_target_v4 "$i18n_cancel"
ExitOnCancel mmproxy_target_v4

echo
inquirer text_input "输入 ipv6 分流目标 地址+端口${acme_tip:-}${ssh_tip:-}: " mmproxy_target_v6 "[::1]:${mmproxy_target_v4#*:}"

if [ -e "/etc/systemd/system/mmproxy-$mmproxy_name.service" ]
Expand Down Expand Up @@ -41460,29 +41462,33 @@ config interface 'lan'
exit 1
fi

if ! luci_app_xray_ver=$(curl -s -m 30 "$FFMPEG_MIRROR_LINK/luci-app-xray.json" | $JQ_FILE -r '.tag_name')
then
Println "$error 无法连接服务器, 请稍后再试\n"
exit 1
else
luci_app_xray_ver=${luci_app_xray_ver#*v}
fi

docker exec -it openwrt /bin/ash -c "
if ! opkg list-installed | grep -q v2ray
then
sed -i 's_downloads.openwrt.org_${FFMPEG_MIRROR_LINK#*\/\/}/openwrt_' /etc/opkg/distfeeds.conf
if ! grep -q kuoruan < /etc/opkg/customfeeds.conf
then
wget -O kuoruan-public.key $FFMPEG_MIRROR_LINK/openwrt-v2ray/packages/public.key
opkg-key add kuoruan-public.key
echo \"src/gz kuoruan_packages $FFMPEG_MIRROR_LINK/openwrt-v2ray/packages/releases/\$(. /etc/openwrt_release ; echo \$DISTRIB_ARCH)\" >> /etc/opkg/customfeeds.conf
echo \"src/gz kuoruan_universal $FFMPEG_MIRROR_LINK/openwrt-v2ray/packages/releases/all\" >> /etc/opkg/customfeeds.conf
fi
sed -i 's_http://downloads.openwrt.org_$FFMPEG_MIRROR_LINK/openwrt_' /etc/opkg/distfeeds.conf
sed -i 's_https://downloads.openwrt.org_$FFMPEG_MIRROR_LINK/openwrt_' /etc/opkg/distfeeds.conf
opkg update
opkg install zoneinfo-asia kmod-tcp-bbr libustream-openssl
opkg remove dnsmasq
opkg install zoneinfo-asia kmod-tcp-bbr libustream-openssl jshn ip-full ipset iptables iptables-mod-tproxy resolveip dnsmasq-full
opkg install luci luci-base luci-compat
if ! test -e /etc/sysctl.d/12-tcp-bbr.conf || ! grep -q default_qdisc < /etc/sysctl.d/12-tcp-bbr.conf
then
echo \"net.core.default_qdisc=fq\" >> /etc/sysctl.d/12-tcp-bbr.conf
sysctl -p
fi
opkg remove dnsmasq
opkg install v2ray-core
opkg install luci-app-v2ray
opkg install luci-i18n-v2ray-zh-cn
wget -O luci-app-v2ray_${luci_app_xray_ver}_all.ipk $FFMPEG_MIRROR_LINK/luci-app-v2ray_${luci_app_xray_ver}_all.ipk
opkg install luci-app-v2ray_${luci_app_xray_ver}_all.ipk --force-reinstall || true
wget -O luci-i18n-v2ray-zh-cn_${luci_app_xray_ver}_all.ipk $FFMPEG_MIRROR_LINK/luci-i18n-v2ray-zh-cn_${luci_app_xray_ver}_all.ipk
opkg install luci-i18n-v2ray-zh-cn_${luci_app_xray_ver}_all.ipk --force-reinstall || true
fi
"

Expand Down Expand Up @@ -41515,7 +41521,8 @@ config interface 'lan'
docker exec -it openwrt /bin/ash -c "
if ! opkg list-installed | grep -q luci-i18n-base-$lang
then
sed -i 's_downloads.openwrt.org_${FFMPEG_MIRROR_LINK#*\/\/}/openwrt_' /etc/opkg/distfeeds.conf
sed -i 's_http://downloads.openwrt.org_$FFMPEG_MIRROR_LINK/openwrt_' /etc/opkg/distfeeds.conf
sed -i 's_https://downloads.openwrt.org_$FFMPEG_MIRROR_LINK/openwrt_' /etc/opkg/distfeeds.conf
opkg update
opkg install luci-i18n-base-$lang
fi
Expand Down Expand Up @@ -41845,22 +41852,22 @@ then
then
if [ -f /etc/apt/sources.list.d/pve-no-subscription.list ]
then
sed -i "s_#deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription_deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription_" /etc/apt/sources.list.d/pve-no-subscription.list
sed -i "s_#deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription_deb $FFMPEG_MIRROR_LINK/proxmox/debian/pve $VERSION_CODENAME pve-no-subscription_" /etc/apt/sources.list.d/pve-no-subscription.list
elif grep -q "pve-no-subscription" < /etc/apt/sources.list
then
sed -i "s_#deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription_deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription_" /etc/apt/sources.list
sed -i "s_#deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription_deb $FFMPEG_MIRROR_LINK/proxmox/debian/pve $VERSION_CODENAME pve-no-subscription_" /etc/apt/sources.list
else
echo "deb http://download.proxmox.com/debian/pve $VERSION_CODENAME pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
echo "deb $FFMPEG_MIRROR_LINK/proxmox/debian/pve $VERSION_CODENAME pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list
fi
else
if [ -f /etc/apt/sources.list.d/pve-enterprise.list ]
then
sed -i "s_#deb https://enterprise.proxmox.com/debian/pve $VERSION_CODENAME pve-enterprise_deb https://enterprise.proxmox.com/debian/pve $VERSION_CODENAME pve-enterprise_" /etc/apt/sources.list.d/pve-enterprise.list
sed -i "s_#deb https://enterprise.proxmox.com/debian/pve $VERSION_CODENAME pve-enterprise_deb $FFMPEG_MIRROR_LINK/proxmox-enterprise/debian/pve $VERSION_CODENAME pve-enterprise_" /etc/apt/sources.list.d/pve-enterprise.list
elif grep -q "pve-enterprise" < /etc/apt/sources.list
then
sed -i "s_#deb https://enterprise.proxmox.com/debian/pve $VERSION_CODENAME pve-enterprise_deb https://enterprise.proxmox.com/debian/pve $VERSION_CODENAME pve-enterprise_" /etc/apt/sources.list
sed -i "s_#deb https://enterprise.proxmox.com/debian/pve $VERSION_CODENAME pve-enterprise_deb $FFMPEG_MIRROR_LINK/proxmox-enterprise/debian/pve $VERSION_CODENAME pve-enterprise_" /etc/apt/sources.list
else
echo "deb https://enterprise.proxmox.com/debian/pve $VERSION_CODENAME pve-enterprise" > /etc/apt/sources.list.d/pve-enterprise.list
echo "deb $FFMPEG_MIRROR_LINK/proxmox-enterprise/debian/pve $VERSION_CODENAME pve-enterprise" > /etc/apt/sources.list.d/pve-enterprise.list
fi
fi

Expand All @@ -41883,7 +41890,7 @@ then
echo
inquirer text_input "输入多少秒后关闭显示器" console_blank_secs 120

sed -i 's_GRUB_CMDLINE_LINUX=""_GRUB_CMDLINE_LINUX="consoleblank='"$console_blank_secs"'"_' /etc/default/grub
sed -i '0,/GRUB_CMDLINE_LINUX=""/s//GRUB_CMDLINE_LINUX="consoleblank='"$console_blank_secs"'"/' /etc/default/grub
else
sed -i '0,/GRUB_CMDLINE_LINUX=.*/s//GRUB_CMDLINE_LINUX=""/' /etc/default/grub
fi
Expand Down Expand Up @@ -41914,12 +41921,10 @@ then
echo
AskIfContinue n "`gettext \"需要安装 mono, 耗时会很长, 是否继续\"`"

. /etc/os-release

apt-get update
apt-get -y install apt-transport-https dirmngr gnupg ca-certificates
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/debian stable-$VERSION_CODENAME main" | tee /etc/apt/sources.list.d/mono-official-stable.list
echo "deb https://download.mono-project.com/repo/debian stable main" | tee /etc/apt/sources.list.d/mono-official-stable.list
apt-get update
apt-get -y install mono-complete git
fi
Expand All @@ -41928,20 +41933,21 @@ then
then
Println "$info 安装 nbfc..."

if [[ ! -x $(command -v git) ]]
then
Println "$info 安装 git..."
apt-get update
apt-get -y install git
fi
DepInstall git
DepInstall curl
DepInstall unzip

git clone https://github.com/hirschmann/nbfc.git /tmp/nbfc
cd /tmp/nbfc
cd /tmp/
curl -s -L "$FFMPEG_MIRROR_LINK/nbfc.zip" -o nbfc.zip
unzip nbfc.zip >/dev/null 2>&1

cd nbfc-master
sed -i 's~NUGET_URL=\"https://dist.nuget.org~NUGET_URL=\"$FFMPEG_MIRROR_LINK/nuget~' build.sh
./build.sh

mkdir /opt/nbfc
cp -r /tmp/nbfc/Linux/bin/Release/* /opt/nbfc/
cp /tmp/nbfc/Linux/{nbfc.service,nbfc-sleep.service} /etc/systemd/system/
cp -r /tmp/nbfc-master/Linux/bin/Release/* /opt/nbfc/
cp /tmp/nbfc-master/Linux/{nbfc.service,nbfc-sleep.service} /etc/systemd/system/
systemctl enable nbfc --now || true
fi

Expand Down Expand Up @@ -43397,9 +43403,9 @@ then
fi
fi

Println "$info 下载 pdf2htmlEX ..."
if [ ! -e "$FFMPEG_MIRROR_ROOT/pdf2htmlEX-0.18.7-poppler-0.81.0.zip" ]
then
Println "$info 下载 pdf2htmlEX ..."
if curl -s -L "https://github.com/pdf2htmlEX/pdf2htmlEX/archive/v0.18.7-poppler-0.81.0.zip" -o "$FFMPEG_MIRROR_ROOT/pdf2htmlEX-0.18.7-poppler-0.81.0.zip_tmp"
then
mv "$FFMPEG_MIRROR_ROOT/pdf2htmlEX-0.18.7-poppler-0.81.0.zip_tmp" "$FFMPEG_MIRROR_ROOT/pdf2htmlEX-0.18.7-poppler-0.81.0.zip"
Expand All @@ -43408,6 +43414,17 @@ then
fi
fi

if [ ! -e "$FFMPEG_MIRROR_ROOT/nbfc.zip" ]
then
Println "$info 下载 nbfc ..."
if curl -s -L "https://github.com/hirschmann/nbfc/archive/master.zip" -o "$FFMPEG_MIRROR_ROOT/nbfc.zip_tmp"
then
mv "$FFMPEG_MIRROR_ROOT/nbfc.zip_tmp" "$FFMPEG_MIRROR_ROOT/nbfc.zip"
else
Println "$error nbfc 下载出错, 无法连接 github ?"
fi
fi

Println "$info 下载 v2ray install-release.sh ..."
if curl -s -L "$V2_LINK" -o "$FFMPEG_MIRROR_ROOT/v2ray_install-release.sh_tmp"
then
Expand Down
Loading

0 comments on commit cd412c8

Please sign in to comment.