Skip to content

Commit 5e87af5

Browse files
committed
Update build.func
1 parent 8bd6d89 commit 5e87af5

File tree

1 file changed

+10
-30
lines changed

1 file changed

+10
-30
lines changed

misc/build.func

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,41 +1053,21 @@ lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
10531053
EOF
10541054
fi
10551055

1056-
}
1057-
1058-
# This starts the container and executes <app>-install.sh
1059-
msg_info "Starting LXC Container"
1060-
pct start "$CTID"
1061-
msg_ok "Started LXC Container"
1062-
1063-
msg_info "Customizing LXC Container"
1064-
: "${tz:=Etc/UTC}"
1065-
if [ "$var_os" == "alpine" ]; then
1066-
sleep 3
1067-
pct exec "$CTID" -- /bin/sh -c 'cat <<EOF >/etc/apk/repositories
1056+
# This starts the container and executes <app>-install.sh
1057+
msg_info "Starting LXC Container"
1058+
pct start "$CTID"
1059+
msg_ok "Started LXC Container"
1060+
if [ "$var_os" == "alpine" ]; then
1061+
sleep 3
1062+
pct exec "$CTID" -- /bin/sh -c 'cat <<EOF >/etc/apk/repositories
10681063
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
10691064
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
10701065
EOF'
1071-
pct exec "$CTID" -- ash -c "apk add bash newt curl openssh nano mc ncurses >/dev/null"
1072-
else
1073-
sleep 3
1074-
pct exec "$CTID" -- bash -c "sed -i '/$LANG/ s/^# //' /etc/locale.gen"
1075-
pct exec "$CTID" -- bash -c "locale_line=\$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print \$1}' | head -n 1) && \
1076-
echo LANG=\$locale_line >/etc/default/locale && \
1077-
locale-gen >/dev/null && \
1078-
export LANG=\$locale_line"
1079-
1080-
if pct exec "$CTID" -- test -e "/usr/share/zoneinfo/$tz"; then
1081-
pct exec "$CTID" -- bash -c "echo $tz >/etc/timezone && ln -sf /usr/share/zoneinfo/$tz /etc/localtime"
1082-
else
1083-
msg_info "Skipping timezone setup – zone '$tz' not found in container"
1066+
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
10841067
fi
1068+
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/"$var_install".sh)" $?
10851069

1086-
pct exec "$CTID" -- bash -c "apt-get update >/dev/null && apt-get install -y sudo curl mc gnupg2 >/dev/null"
1087-
fi
1088-
msg_ok "Customized LXC Container"
1089-
1090-
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/"$var_install".sh)" $?
1070+
}
10911071

10921072
# This function sets the description of the container.
10931073
description() {

0 commit comments

Comments
 (0)