forked from esirplayground/AutoBuild-OpenWrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiy-part2.sh
executable file
·55 lines (46 loc) · 2.25 KB
/
diy-part2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
#
# Copyright (c) 2019-2020 P3TERX <https://p3terx.com>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/P3TERX/Actions-OpenWrt
# File name: diy-part2.sh
# Description: OpenWrt DIY script part 2 (After Update feeds)
#
# 设置密码为空
sed -i '/CYXluq4wUazHjmCDBCqXF/d' package/lean/default-settings/files/zzz-default-settings
# Modify default theme(FROM uci-theme-bootstrap CHANGE TO luci-theme-material)
sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' ./feeds/luci/collections/luci/Makefile
# Set DISTRIB_REVISION
sed -i "s/OpenWrt_x86_64 /Build $(TZ=UTC-8 date "+%Y.%m.%d") Compiled by Drixn /g" package/lean/default-settings/files/zzz-default-settings
# Modify default IP(FROM 192.168.1.1 CHANGE TO 10.10.10.2)
echo '自定义 LAN 口 IP...'
sed -i 's/192.168.1.1/10.10.10.2/g' package/base-files/files/bin/config_generate
# Modify system hostname(FROM OpenWrt CHANGE TO OpenWrt-x86_64)
sed -i 's/OpenWrt/OpenWrt-x86_64/g' package/base-files/files/bin/config_generate
# 修复部分插件自启动脚本丢失可执行权限问题
sed -i '/exit 0/i\chmod +x /etc/init.d/*' package/lean/default-settings/files/zzz-default-settings
# 拉取软件包
git clone https://github.com/kenzok8/small-package package/small-package
git clone https://github.com/jerrykuku/luci-app-argon-config.git package/luci-app-argon-config
git clone -b 18.06 https://github.com/jerrykuku/luci-theme-argon.git package/luci-theme-argon
# replace banner
cp -f $GITHUB_WORKSPACE/diy/banner package/base-files/files/etc/banner
# 删除重复包
rm -rf feeds/luci/themes/luci-theme-argon
rm -rf package/small-package/luci-app-openvpn-server
rm -rf package/small-package/openvpn-easy-rsa-whisky
rm -rf package/small-package/luci-app-wrtbwmon
rm -rf package/small-package/wrtbwmon
rm -rf package/small-package/luci-app-koolproxyR
rm -rf package/small-package/luci-app-godproxy
rm -rf package/small-package/luci-app-argon*
rm -rf package/small-package/luci-theme-argon*
rm -rf package/small-package/luci-app-amlogic
rm -rf package/small-package/luci-app-unblockneteasemusic
rm -rf package/small-package/upx-static
rm -rf package/small-package/upx
rm -rf package/small-package/firewall*
rm -rf package/small-package/opkg