Compare commits

..

6 Commits
dev ... master

Author SHA1 Message Date
悟空的日常镜像仓库 84f44a3afc 同步文件 2024-05-22 15:02:16 +08:00
悟空的日常镜像仓库 3bd498a8f2 新增安装1panel面板的菜单 2024-05-22 14:46:03 +08:00
wukongdaily 1a5601daf1
Update README.md 2024-04-12 10:36:53 +08:00
悟空的日常镜像仓库 c9be3c2a61 bug修复:解决pv找不到引起的转换vdi失败问题
https://github.com/wukongdaily/diy-nas-onescript/issues/7
考虑到pv仅仅是一个解压进度条的显示,用处不大。
移除pv依赖并更换解压方式
2024-04-10 11:00:25 +08:00
wukongdaily e54c01c179
Update README.md 2023-12-21 14:24:41 +08:00
wukongdaily dca5072c34
Merge pull request #3 from wukongdaily/dev
合并开发分支的功能
2023-12-20 19:34:45 +08:00
2 changed files with 22 additions and 12 deletions

View File

@ -6,6 +6,11 @@
## ❤[使用方法 Wiki](https://github.com/wukongdaily/diy-nas-onescript/wiki)
```
curl -fsSL https://cafe.cpolar.cn/wkdaily/diy-nas-onescript/raw/branch/master/shell/diy.sh -o diy.sh && chmod +x diy.sh && ./diy.sh
```
## ‼️[提BUG](https://github.com/wukongdaily/diy-nas-onescript/issues)
## 适配系统
✅ Deepin v23beta2<br>
@ -20,5 +25,9 @@ https://www.deepin.org/zh/deepin-v23-beta2-released/
![FinalShell 4 3 0 6 2023-12-11 09-39-21](https://github.com/wukongdaily/diy-nas-onescript/assets/143675923/be5bc400-9f0b-4062-a60f-4551512b63d8)
![image](https://github.com/wukongdaily/diy-nas-onescript/assets/143675923/3e132260-ff1a-4bc7-9b53-16cf7c466fae)
# 💰打赏作者💰
<img src="https://github.com/wukongdaily/tvhelper-docker/assets/143675923/1f92c5ba-1b6b-4967-a1ab-20697159badc" width="30%" />

View File

@ -91,6 +91,7 @@ menu_options=(
"还原配置文件os-release"
"配置docker为国内镜像"
"安装btop资源监控工具"
"安装1panel面板(推荐)"
"卸载虚拟机"
"卸载 CasaOS"
)
@ -113,6 +114,9 @@ commands=(
["VirtualBox硬盘直通"]="attach_raw_disk_to_vm"
["创建root身份的VirtualBox图标"]="create_root_vm_desktop"
["刷新虚拟硬盘的UUID"]="refresh_vm_disk_uuid"
["安装1panel面板(推荐)"]="install_1panel"
)
@ -168,14 +172,6 @@ install_virtualbox_extpack() {
# 格式转换
convert_vm_format() {
echo "虚拟机一键格式转换(img2vdi)"
sudo apt-get update >/dev/null 2>&1
if ! command -v pv &>/dev/null; then
echo "pv is not installed. Installing pv..."
sudo apt-get install pv -y || true
else
echo -e
fi
# 获取用户输入的文件路径
read -p "请将待转换的文件拖拽到此处(img|img.zip|img.gz): " file_path
@ -214,7 +210,7 @@ convert_vm_format() {
elif [[ "$file_path" == *.img.gz ]]; then
# 如果是 img.gz 文件,先解压
Show 0 "正在解压 img.gz 文件..."
pv "$file_path" | gunzip -c >"${file_path%.*}" || true
gzip -cd "$file_path" > "${file_path%.*}" || true
img_file="${file_path%.*}"
# 执行转换命令
@ -266,10 +262,10 @@ prepare_for_casaos() {
Show 0 "打补丁和临时修改os-release"
# 打补丁
# 安装深度deepin缺少的依赖包udevil
wget -O /tmp/udevil.deb https://cdn.jsdelivr.net/gh/wukongdaily/diy-nas-onescript@master/res/udevil.deb
wget -O /tmp/udevil.deb https://cafe.cpolar.cn/wkdaily/diy-nas-onescript/raw/branch/master/res/udevil.deb
sudo dpkg -i /tmp/udevil.deb
# 安装深度deepin缺少的依赖包mergerfs
wget -O /tmp/mergerfs.deb https://cdn.jsdelivr.net/gh/wukongdaily/diy-nas-onescript@master/res/mergerfs.deb
wget -O /tmp/mergerfs.deb https://cafe.cpolar.cn/wkdaily/diy-nas-onescript/raw/branch/master/res/mergerfs.deb
sudo dpkg -i /tmp/mergerfs.deb
#伪装debian 12 修改系统名称和代号待CasaOS安装成功后还原回来
@ -645,6 +641,11 @@ refresh_vm_disk_uuid() {
fi
}
#安装1panel面板
install_1panel(){
curl -sSL https://resource.fit2cloud.com/1panel/package/quick_start.sh -o quick_start.sh && bash quick_start.sh
}
show_menu() {
clear
YELLOW="\e[33m"