Update build.func
This commit is contained in:
parent
10b980fb86
commit
e1edebd91c
@ -498,7 +498,6 @@ advanced_settings() {
|
|||||||
exit_script
|
exit_script
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
IFACE_FILEPATH_LIST="/etc/network/interfaces"$'\n'$(find "/etc/network/interfaces.d/" -type f)
|
IFACE_FILEPATH_LIST="/etc/network/interfaces"$'\n'$(find "/etc/network/interfaces.d/" -type f)
|
||||||
BRIDGES=""
|
BRIDGES=""
|
||||||
OLD_IFS=$IFS
|
OLD_IFS=$IFS
|
||||||
@ -779,7 +778,6 @@ EOF
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
install_script() {
|
install_script() {
|
||||||
pve_check
|
pve_check
|
||||||
shell_check
|
shell_check
|
||||||
@ -1077,7 +1075,27 @@ EOF'
|
|||||||
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 >/dev/null"
|
||||||
fi
|
fi
|
||||||
msg_ok "Customized LXC Container"
|
msg_ok "Customized LXC Container"
|
||||||
lxc-attach -n "$CTID" -- bash -c "$(curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/install/$var_install.sh)" $?
|
|
||||||
|
# Remote-Skript innerhalb des Containers mit Trap sauber ausführen
|
||||||
|
lxc-attach -n "$CTID" -- bash -c '
|
||||||
|
set -e
|
||||||
|
trap "echo Aborted in container; exit 130" SIGINT SIGTERM
|
||||||
|
|
||||||
|
tmp_script="/tmp/install_remote.sh"
|
||||||
|
curl -fsSL https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/install/'"$var_install"'.sh -o "$tmp_script"
|
||||||
|
chmod +x "$tmp_script"
|
||||||
|
bash "$tmp_script"
|
||||||
|
'
|
||||||
|
exit_code=$?
|
||||||
|
if [[ "$exit_code" -eq 130 || "$exit_code" -eq 143 ]]; then
|
||||||
|
echo
|
||||||
|
msg_error "Script aborted by user inside container"
|
||||||
|
exit "$exit_code"
|
||||||
|
elif [[ "$exit_code" -ne 0 ]]; then
|
||||||
|
echo
|
||||||
|
msg_error "Install script failed in container (exit code $exit_code)"
|
||||||
|
exit "$exit_code"
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1124,8 +1142,6 @@ EOF
|
|||||||
systemctl start ping-instances.service
|
systemctl start ping-instances.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
post_update_to_api "done" "none"
|
post_update_to_api "done" "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user