Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
c5da871e36 | |||
d9cbcdac83 | |||
20fb0df4be | |||
b419551e4f | |||
f819178e6c | |||
1ecfb0f8ab | |||
|
c5c54b4d20 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,4 +4,4 @@ ib
|
|||||||
ib_x86_64
|
ib_x86_64
|
||||||
ib_rk35xx
|
ib_rk35xx
|
||||||
ib_rk33xx
|
ib_rk33xx
|
||||||
|
.DS_Store
|
||||||
|
27
1p.sh
Executable file
27
1p.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
TARGET=$1
|
||||||
|
case ${TARGET} in
|
||||||
|
x86_64)
|
||||||
|
;;
|
||||||
|
rk35xx)
|
||||||
|
;;
|
||||||
|
rk33xx)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Please choose target: x86_64 or rk35xx or rk33xx"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
CURR=`pwd`
|
||||||
|
mkdir -p dl
|
||||||
|
mkdir -p ${CURR}/ib_${TARGET}
|
||||||
|
|
||||||
|
docker run --rm -u $(id -u):$(id -g) \
|
||||||
|
-v ${CURR}:/work \
|
||||||
|
-v ${CURR}/ib_${TARGET}:/work/ib \
|
||||||
|
-e WORK_TARGET=${TARGET} \
|
||||||
|
linkease/runmynas:latest
|
||||||
|
|
@ -8,4 +8,7 @@ Define a system base iStoreOS by yourself.
|
|||||||
* ./runmynas.sh rk35xx
|
* ./runmynas.sh rk35xx
|
||||||
* ./runmynas.sh rk33xx
|
* ./runmynas.sh rk33xx
|
||||||
|
|
||||||
|
## 或调用封装脚本
|
||||||
|
* ./buildx.sh
|
||||||
|
|
||||||
|
|
||||||
|
36
buildx.sh
Executable file
36
buildx.sh
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# 定义菜单
|
||||||
|
show_menu() {
|
||||||
|
echo "请选择要执行的命令:"
|
||||||
|
echo "1. 编译 x86_64"
|
||||||
|
echo "2. 编译 rk33xx"
|
||||||
|
echo "3. 编译 rk35xx"
|
||||||
|
echo "q. 退出"
|
||||||
|
}
|
||||||
|
# 主循环
|
||||||
|
while true; do
|
||||||
|
show_menu
|
||||||
|
read -p "请输入选项:" choice
|
||||||
|
case $choice in
|
||||||
|
1)
|
||||||
|
rm -rf ib_x86_64
|
||||||
|
./runmynas.sh x86_64
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
rm -rf ib_rk33xx
|
||||||
|
./runmynas.sh rk33xx
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
rm -rf ib_rk35xx
|
||||||
|
./runmynas.sh rk35xx
|
||||||
|
;;
|
||||||
|
q)
|
||||||
|
echo "退出菜单"
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "无效的选项,请重新输入"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
@ -1,9 +1,9 @@
|
|||||||
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
|
deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
|
||||||
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
|
#deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
|
||||||
deb http://mirrors.aliyun.com/debian-security buster/updates main
|
deb http://mirrors.aliyun.com/debian-security buster/updates main
|
||||||
deb-src http://mirrors.aliyun.com/debian-security buster/updates main
|
#deb-src http://mirrors.aliyun.com/debian-security buster/updates main
|
||||||
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
|
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
|
||||||
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
|
#deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
|
||||||
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
|
#deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
|
||||||
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
|
#deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
|
||||||
|
|
||||||
|
97
files/all/etc/uci-defaults/99-custom-init
Normal file
97
files/all/etc/uci-defaults/99-custom-init
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# 方便安卓原生tv用户联网 增加安卓自定义域名
|
||||||
|
add_dhcp_domain() {
|
||||||
|
local domain_name="time.android.com"
|
||||||
|
local domain_ip="203.107.6.88"
|
||||||
|
|
||||||
|
# 检查是否存在相同的域名记录
|
||||||
|
existing_records=$(uci show dhcp | grep "dhcp.@domain\[[0-9]\+\].name='$domain_name'")
|
||||||
|
if [ -z "$existing_records" ]; then
|
||||||
|
# 添加新的域名记录
|
||||||
|
uci add dhcp domain
|
||||||
|
uci set "dhcp.@domain[-1].name=$domain_name"
|
||||||
|
uci set "dhcp.@domain[-1].ip=$domain_ip"
|
||||||
|
uci commit dhcp
|
||||||
|
else
|
||||||
|
echo "Domain $domain_name already exists."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# 修改默认网关地址
|
||||||
|
change_default_ip() {
|
||||||
|
local new_ip="192.168.88.1"
|
||||||
|
|
||||||
|
# 修改网络配置中的默认 IP 地址
|
||||||
|
uci set network.lan.ipaddr="$new_ip"
|
||||||
|
uci commit network
|
||||||
|
|
||||||
|
# 修改 dhcp 配置中的默认 IP 地址
|
||||||
|
uci set dhcp.lan.start='100'
|
||||||
|
uci set dhcp.lan.limit='150'
|
||||||
|
uci commit dhcp
|
||||||
|
}
|
||||||
|
|
||||||
|
# 设置默认wan口也能直接访问webui
|
||||||
|
set_firewall_wan_open() {
|
||||||
|
# 设置防火墙 WAN 区域的输入策略为 ACCEPT
|
||||||
|
uci set firewall.@zone[1].input='ACCEPT'
|
||||||
|
uci commit firewall
|
||||||
|
}
|
||||||
|
|
||||||
|
# 设置主机名信息iStoreNAS
|
||||||
|
change_hostname() {
|
||||||
|
local new_hostname="iStoreNAS"
|
||||||
|
|
||||||
|
# 设置主机名
|
||||||
|
uci set system.@system[0].hostname="$new_hostname"
|
||||||
|
uci commit system
|
||||||
|
|
||||||
|
# 同时更改 /proc/sys/kernel/hostname 文件
|
||||||
|
echo "$new_hostname" > /proc/sys/kernel/hostname
|
||||||
|
}
|
||||||
|
|
||||||
|
# 追加编译作者信息
|
||||||
|
modify_firmware_description() {
|
||||||
|
# 修改 /etc/openwrt_release 文件中的 DISTRIB_DESCRIPTION 字段
|
||||||
|
sed -i "s/\(DISTRIB_DESCRIPTION='.*\)'/\1 Compiled by wukongdaily'/" /etc/openwrt_release
|
||||||
|
}
|
||||||
|
# 追加命令行banner信息
|
||||||
|
modify_banner_info() {
|
||||||
|
append_text=" Compiled by wukongdaily And U can bash tv.sh"
|
||||||
|
awk -v append_text="$append_text" '
|
||||||
|
{
|
||||||
|
lines[NR] = $0
|
||||||
|
count = NR
|
||||||
|
}
|
||||||
|
END {
|
||||||
|
for (i = 1; i <= count; i++) {
|
||||||
|
print lines[i]
|
||||||
|
if (i == count - 1) {
|
||||||
|
print append_text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
' /etc/banner > /etc/banner.tmp && mv /etc/banner.tmp /etc/banner
|
||||||
|
}
|
||||||
|
|
||||||
|
# 调用函数 add_dhcp_domain
|
||||||
|
add_dhcp_domain
|
||||||
|
|
||||||
|
# 调用函数 change_default_ip
|
||||||
|
change_default_ip
|
||||||
|
|
||||||
|
# 调用函数 set_firewall_wan_open
|
||||||
|
set_firewall_wan_open
|
||||||
|
|
||||||
|
# 调用函数 change_hostname
|
||||||
|
change_hostname
|
||||||
|
|
||||||
|
# 调用函数 modify_firmware_description
|
||||||
|
modify_firmware_description
|
||||||
|
|
||||||
|
# 调用函数 modify_banner_info
|
||||||
|
modify_banner_info
|
||||||
|
|
||||||
|
# 移除脚本文件以确保它只运行一次
|
||||||
|
rm -f /etc/uci-defaults/99-custom-init
|
1075
files/all/root/tv.sh
Normal file
1075
files/all/root/tv.sh
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,4 +8,7 @@ luci-app-routerdog
|
|||||||
aria2
|
aria2
|
||||||
luci-app-aria2
|
luci-app-aria2
|
||||||
app-meta-routerdog
|
app-meta-routerdog
|
||||||
|
app-meta-alist
|
||||||
|
app-meta-homebox
|
||||||
|
app-meta-systools
|
||||||
|
app-meta-poweroff
|
||||||
|
@ -5,4 +5,7 @@ luci-app-routerdog
|
|||||||
aria2
|
aria2
|
||||||
luci-app-aria2
|
luci-app-aria2
|
||||||
app-meta-routerdog
|
app-meta-routerdog
|
||||||
|
app-meta-alist
|
||||||
|
app-meta-homebox
|
||||||
|
app-meta-systools
|
||||||
|
app-meta-poweroff
|
||||||
|
@ -5,4 +5,7 @@ luci-app-routerdog
|
|||||||
aria2
|
aria2
|
||||||
luci-app-aria2
|
luci-app-aria2
|
||||||
app-meta-routerdog
|
app-meta-routerdog
|
||||||
|
app-meta-alist
|
||||||
|
app-meta-homebox
|
||||||
|
app-meta-systools
|
||||||
|
app-meta-poweroff
|
||||||
|
Loading…
Reference in New Issue
Block a user