refactor: 将脚本下载链接中的分支从 main 更新为 2026
This commit is contained in:
4
1.sh
4
1.sh
@@ -3,8 +3,8 @@
|
||||
# ...
|
||||
#
|
||||
# 使用方法:
|
||||
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/1.sh"; curl -fsSL "$URL" | bash
|
||||
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/1.sh"; wget -q -O - "$URL" | bash
|
||||
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/2026/1.sh"; curl -fsSL "$URL" | bash
|
||||
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/2026/1.sh"; wget -q -O - "$URL" | bash
|
||||
|
||||
set -e # 遇到错误即退出
|
||||
trap 'echo "Error on line $LINENO"' ERR
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# 功能:更新软件包、清理缓存、检查服务状态
|
||||
#
|
||||
# 使用方法:
|
||||
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/alpine/upgrade.sh"; wget -q -O - "$URL" | bash
|
||||
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/2026/alpine/upgrade.sh"; wget -q -O - "$URL" | bash
|
||||
|
||||
cat <<EOF > /etc/apk/repositories
|
||||
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
|
||||
|
||||
@@ -101,7 +101,7 @@ docker_exec() {
|
||||
set -- "$@" --shell="$EXEC_SHELL"
|
||||
fi
|
||||
|
||||
curl -fsSL "https://Git.1-H.CC/Scripts/Linux/raw/branch/main/docker-exec-via-sock.sh" | sh -s -- "$@"
|
||||
curl -fsSL "https://git.1-h.cc/Scripts/Linux/raw/branch/2026/docker-exec-via-sock.sh" | sh -s -- "$@"
|
||||
}
|
||||
|
||||
while [ "$#" -gt 0 ]; do
|
||||
@@ -305,7 +305,7 @@ printf '\n' >&2
|
||||
log "数据库备份完成"
|
||||
|
||||
log "正在调用远程清理脚本,前缀为 '$BACKUP_PREFIX',目录为 $BACKUP_DIR"
|
||||
if ! curl -fsSL "https://Git.1-H.CC/Scripts/Linux/raw/branch/main/database-dump-cleanup.sh" | \
|
||||
if ! curl -fsSL "https://git.1-h.cc/Scripts/Linux/raw/branch/2026/database-dump-cleanup.sh" | \
|
||||
sh -s -- --prefix="$BACKUP_PREFIX" --dir="$BACKUP_DIR"; then
|
||||
log "清理脚本失败"
|
||||
fi
|
||||
|
||||
2
debian/upgrade.sh
vendored
2
debian/upgrade.sh
vendored
@@ -3,7 +3,7 @@
|
||||
# ...
|
||||
#
|
||||
# 使用方法:
|
||||
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/debian/upgrade.sh"; curl -fsSL "$URL" | bash
|
||||
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/2026/debian/upgrade.sh"; curl -fsSL "$URL" | bash
|
||||
|
||||
# 设置非交互式环境变量
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# ...
|
||||
#
|
||||
# 使用方法:
|
||||
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/main/upgrade.sh"; curl -fsSL "$URL" | bash
|
||||
# URL="https://git.1-h.cc/Scripts/Linux/raw/branch/2026/upgrade.sh"; curl -fsSL "$URL" | bash
|
||||
|
||||
if [ -f /etc/debian_version ]; then
|
||||
SYSTEM_TYPE="debian"
|
||||
|
||||
Reference in New Issue
Block a user