mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-09-13 10:49:41 +00:00
[GH] Remove unwanted output from script test workflow (#2337)
* Remove unwanted output from workflow * Remove unwanted output from workflow * update .yml so it supports external repos * update .yml so it supports external repos
This commit is contained in:
parent
b99adb5e1a
commit
caa4b7d19e
4 changed files with 63 additions and 60 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: michelroegl-brunner
|
||||
# Author: Michel Roegl-Brunner (michelroegl-brunner)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
|
||||
color() {
|
||||
|
@ -11,13 +11,14 @@ catch_errors() {
|
|||
trap 'error_handler $LINENO "$BASH_COMMAND"' ERR
|
||||
}
|
||||
|
||||
|
||||
error_handler() {
|
||||
local line_number="$1"
|
||||
local command="$2"
|
||||
SCRIPT_NAME=$(basename "$0")
|
||||
local error_message="$SCRIPT_NAME: Failure in line $line_number while executing command $command"
|
||||
echo -e "\n$error_message"
|
||||
exit "$error_message"
|
||||
exit 200
|
||||
}
|
||||
verb_ip6() {
|
||||
STD=""
|
||||
|
@ -39,9 +40,11 @@ msg_error() {
|
|||
local msg="$1"
|
||||
echo -e "${msg}\n"
|
||||
}
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
|
||||
RETRY_NUM=10
|
||||
RETRY_EVERY=3
|
||||
setting_up_container() {
|
||||
|
||||
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
|
||||
locale_line=$(grep -v '^#' /etc/locale.gen | grep -E '^[a-zA-Z]' | awk '{print $1}' | head -n 1)
|
||||
echo "LANG=${locale_line}" >/etc/default/locale
|
||||
|
@ -54,7 +57,6 @@ setting_up_container() {
|
|||
if [ "$(hostname -I)" != "" ]; then
|
||||
break
|
||||
fi
|
||||
echo 1>&2 -en "No Network! "
|
||||
sleep $RETRY_EVERY
|
||||
done
|
||||
if [ "$(hostname -I)" = "" ]; then
|
||||
|
@ -64,8 +66,6 @@ setting_up_container() {
|
|||
fi
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
systemctl disable -q --now systemd-networkd-wait-online.service
|
||||
msg_ok "Set up Container OS"
|
||||
msg_ok "Network Connected: $(hostname -I)"
|
||||
}
|
||||
|
||||
network_check() {
|
||||
|
@ -75,11 +75,10 @@ network_check() {
|
|||
}
|
||||
|
||||
update_os() {
|
||||
msg_info "Updating Container OS"
|
||||
apt-get update
|
||||
apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Updated Container OS"
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update >/dev/null 2>&1
|
||||
apt-get -o Dpkg::Options::="--force-confold" -y dist-upgrade >/dev/null 2>&1
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
}
|
||||
|
||||
motd_ssh() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue