代码拉取完成,页面将自动刷新
#!/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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。