mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-07-27 00:07:38 +00:00
Compare commits
4 Commits
add-script
...
build_func
Author | SHA1 | Date | |
---|---|---|---|
b87ea8d535 | |||
02f8f09c63 | |||
42af89dd2d | |||
003fc3c080 |
@ -14,6 +14,10 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- #### 🐞 Bug Fixes
|
||||
|
||||
- fix(nginxproxymanager.sh): Set the version number before build. [@JMarcosHP](https://github.com/JMarcosHP) ([#6139](https://github.com/community-scripts/ProxmoxVE/pull/6139))
|
||||
|
||||
- #### ✨ New Features
|
||||
|
||||
- wallos: add cron in installer for yearly cost [@CrazyWolf13](https://github.com/CrazyWolf13) ([#6133](https://github.com/community-scripts/ProxmoxVE/pull/6133))
|
||||
|
@ -46,6 +46,8 @@ function update_script() {
|
||||
|
||||
msg_info "Building Frontend"
|
||||
(
|
||||
sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json
|
||||
sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json
|
||||
cd ./frontend || exit
|
||||
$STD pnpm install
|
||||
$STD pnpm upgrade
|
||||
@ -72,8 +74,6 @@ function update_script() {
|
||||
ln -sf /usr/bin/certbot /opt/certbot/bin/certbot
|
||||
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
|
||||
ln -sf /usr/local/openresty/nginx/ /etc/nginx
|
||||
sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json
|
||||
sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json
|
||||
sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf
|
||||
NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf")
|
||||
for NGINX_CONF in $NGINX_CONFS; do
|
||||
|
@ -1201,7 +1201,52 @@ EOF
|
||||
# This starts the container and executes <app>-install.sh
|
||||
msg_info "Starting LXC Container"
|
||||
pct start "$CTID"
|
||||
|
||||
# wait for status 'running'
|
||||
for i in {1..10}; do
|
||||
if pct status "$CTID" | grep -q "status: running"; then
|
||||
msg_ok "Started LXC Container"
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
if [ "$i" -eq 10 ]; then
|
||||
msg_error "LXC Container did not reach running state"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$var_os" != "alpine" ]; then
|
||||
msg_info "Waiting for network in LXC container"
|
||||
for i in {1..10}; do
|
||||
if pct exec "$CTID" -- ping -c1 -W1 deb.debian.org >/dev/null 2>&1; then
|
||||
msg_ok "Network in LXC is reachable"
|
||||
break
|
||||
fi
|
||||
if [ "$i" -lt 10 ]; then
|
||||
msg_warn "No network yet in LXC (try $i/10) – waiting..."
|
||||
sleep 3
|
||||
else
|
||||
msg_error "No network in LXC after waiting."
|
||||
read -r -p "Set fallback DNS (1.1.1.1/8.8.8.8)? [y/N]: " choice
|
||||
case "$choice" in
|
||||
[yY]*)
|
||||
pct set "$CTID" --nameserver 1.1.1.1
|
||||
pct set "$CTID" --nameserver 8.8.8.8
|
||||
if pct exec "$CTID" -- ping -c1 -W1 deb.debian.org >/dev/null 2>&1; then
|
||||
msg_ok "Network reachable after DNS fallback"
|
||||
else
|
||||
msg_error "Still no network/DNS in LXC! Aborting customization."
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
msg_error "Aborted by user – no DNS fallback set."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
msg_info "Customizing LXC Container"
|
||||
: "${tz:=Etc/UTC}"
|
||||
@ -1211,7 +1256,7 @@ EOF
|
||||
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main
|
||||
http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
|
||||
EOF'
|
||||
pct exec "$CTID" -- ash -c "apk add bash newt curl openssh nano mc ncurses >/dev/null"
|
||||
pct exec "$CTID" -- ash -c "apk add bash newt curl openssh nano mc ncurses jq >/dev/null"
|
||||
else
|
||||
sleep 3
|
||||
pct exec "$CTID" -- bash -c "sed -i '/$LANG/ s/^# //' /etc/locale.gen"
|
||||
@ -1229,7 +1274,7 @@ EOF'
|
||||
msg_warn "Skipping timezone setup – zone '$tz' not found in container"
|
||||
fi
|
||||
|
||||
pct exec "$CTID" -- bash -c "apt-get update >/dev/null && apt-get install -y sudo curl mc gnupg2 >/dev/null"
|
||||
pct exec "$CTID" -- bash -c "apt-get update >/dev/null && apt-get install -y sudo curl mc gnupg2 jq >/dev/null"
|
||||
fi
|
||||
msg_ok "Customized LXC Container"
|
||||
|
||||
|
Reference in New Issue
Block a user