2 Star 0 Fork 0

anotherday/omv-packages

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
omv6-plugin-install.sh 3.28 KB
一键复制 编辑 原始数据 按行查看 历史
anotherday 提交于 2024-05-13 05:48 . u 1
#!/bin/bash
if [[ $(id -u) -ne 0 ]]; then
echo "This script must be executed as root or using sudo."
exit 99
fi
plugin_list="
docker-ce
docker-ce-cli
docker-compose-plugin
openmediavault-apttool
openmediavault-autoshutdown
openmediavault-backup
openmediavault-borgbackup
openmediavault-usbbackup
openmediavault-clamav
openmediavault-fail2ban
openmediavault-resetperms
openmediavault-diskstats
openmediavault-downloader
openmediavault-mergerfs
openmediavault-remotemount
openmediavault-rsnapshot
openmediavault-filebrowser
openmediavault-flashmemory
openmediavault-sftp
openmediavault-sharerootfs
openmediavault-symlinks
openmediavault-wakealarm
openmediavault-wol
openmediavault-lvm2
openmediavault-zfs
openmediavault-snapraid
openmediavault-s3
openmediavault-tgt
openmediavault-compose
openmediavault-kvm
openmediavault-kernel
"
cat <<EOF > /etc/apt/sources.list
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main
deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
EOF
cat <<EOF > /etc/apt/sources.list.d/omvdocker.list
deb [signed-by=/usr/share/keyrings/docker.gpg arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian bullseye stable
EOF
cat <<EOF > /etc/apt/sources.list.d/omvextras.list
deb [signed-by=/usr/share/keyrings/omvextras.gpg arch=amd64] https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/openmediavault-plugin-developers shaitan main
EOF
cat <<EOF > /etc/apt/sources.list.d/openmediavault.list
deb https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/public shaitan main
deb https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/packages shaitan main
## Uncomment the following line to add software from the proposed repository.
# deb https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/public shaitan-proposed main
# deb https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/packages shaitan-proposed main
## This software is not part of OpenMediaVault, but is offered by third-party
## developers as a service to OpenMediaVault users.
# deb https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/public shaitan partner
# deb https://mirrors.tuna.tsinghua.edu.cn/OpenMediaVault/packages shaitan partner
EOF
cat <<EOF > /etc/apt/sources.list.d/openmediavault-os-security.list
# default
# deb http://security.debian.org/debian-security bullseye-security main contrib non-free
# deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free
#
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
EOF
apt clean all
apt update
apt -y upgrade
wait
apt -y install ${plugin_list}
wait
[ ! -f /etc/docker ]&& mkdir -p /etc/docker
wait
cat > /etc/docker/daemon.json << 'EOF'
{
"data-root": "/var/lib/docker",
"registry-mirrors": [
"https://registry.docker-cn.com",
"https://hub-mirror.c.163.com",
"https://ccr.ccs.tencentyun.com",
"https://docker.mirrors.ustc.edu.cn"
]
}
EOF
# set timezone Asia/Shanghai
timedatectl set-timezone Asia/Shanghai
systemctl daemon-reload
systemctl restart docker
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Shell
1
https://gitee.com/anotherday/omv-packages.git
git@gitee.com:anotherday/omv-packages.git
anotherday
omv-packages
omv-packages
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385