mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-19 22:08:07 +00:00
core: fix raw path (#3656)
This commit is contained in:
parent
109235f720
commit
23c01141db
@ -36,7 +36,7 @@
|
|||||||
"type": "info"
|
"type": "info"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"text": "To exclude LXCs from updating, edit the crontab using `crontab -e` and add CTID as shown in the example below:\n\n\n\n`0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c '$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/update-lxcs-cron.sh)' -s 103 111 >>/var/log/update-lxcs-cron.log 2>/dev/null`",
|
"text": "To exclude LXCs from updating, edit the crontab using `crontab -e` and add CTID as shown in the example below:\n\n\n\n`0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c '$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/update-lxcs-cron.sh)' -s 103 111 >>/var/log/update-lxcs-cron.log 2>/dev/null`",
|
||||||
"type": "info"
|
"type": "info"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ $STD apt-get install -y g++-multilib
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Daemon Sync Server"
|
msg_info "Installing Daemon Sync Server"
|
||||||
curl -fsSL "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/daemonsync_2.2.0.0059_amd64.deb" -o "daemonsync_2.2.0.0059_amd64.deb"
|
curl -fsSL "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/daemonsync_2.2.0.0059_amd64.deb" -o "daemonsync_2.2.0.0059_amd64.deb"
|
||||||
$STD dpkg -i daemonsync_2.2.0.0059_amd64.deb
|
$STD dpkg -i daemonsync_2.2.0.0059_amd64.deb
|
||||||
msg_ok "Installed Daemon Sync Server"
|
msg_ok "Installed Daemon Sync Server"
|
||||||
|
|
||||||
|
@ -94,12 +94,12 @@ msg_error() {
|
|||||||
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
|
# This function sets up the Container OS by generating the locale, setting the timezone, and checking the network connection
|
||||||
setting_up_container() {
|
setting_up_container() {
|
||||||
msg_info "Setting up Container OS"
|
msg_info "Setting up Container OS"
|
||||||
while [ $i -gt 0 ]; do
|
while [ "$i" -gt 0 ]; do
|
||||||
if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then
|
if [ "$(ip addr show | grep 'inet ' | grep -v '127.0.0.1' | awk '{print $2}' | cut -d'/' -f1)" != "" ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||||
sleep $RETRY_EVERY
|
sleep "$RETRY_EVERY"
|
||||||
i=$((i - 1))
|
i=$((i - 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -194,6 +194,6 @@ customize() {
|
|||||||
msg_ok "Customized Container"
|
msg_ok "Customized Container"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)\"" >/usr/bin/update
|
||||||
chmod +x /usr/bin/update
|
chmod +x /usr/bin/update
|
||||||
}
|
}
|
||||||
|
@ -128,4 +128,4 @@ info "Successfully Transferred Data."
|
|||||||
|
|
||||||
# Use to copy all data from one Home Assistant LXC to another
|
# Use to copy all data from one Home Assistant LXC to another
|
||||||
# run from the Proxmox Shell
|
# run from the Proxmox Shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/copy-data/home-assistant-container-copy-data-home-assistant-container.sh)"
|
||||||
|
@ -124,4 +124,4 @@ info "Successfully Transferred Data."
|
|||||||
|
|
||||||
# Use to copy all data from a Home Assistant Container LXC to a Home Assistant Core LXC
|
# Use to copy all data from a Home Assistant Container LXC to a Home Assistant Core LXC
|
||||||
# run from the Proxmox Shell
|
# run from the Proxmox Shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/copy-data/home-assistant-container-copy-data-home-assistant-core.sh)"
|
||||||
|
@ -129,4 +129,4 @@ info "Successfully Transferred Data."
|
|||||||
|
|
||||||
# Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC
|
# Use to copy all data from a Home Assistant LXC to a Podman Home Assistant LXC
|
||||||
# run from the Proxmox Shell
|
# run from the Proxmox Shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/copy-data/home-assistant-container-copy-data-podman-home-assistant.sh)"
|
||||||
|
@ -124,4 +124,4 @@ info "Successfully Transferred Data."
|
|||||||
|
|
||||||
# Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC
|
# Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC
|
||||||
# run from the Proxmox Shell
|
# run from the Proxmox Shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/copy-data/home-assistant-core-copy-data-home-assistant-container.sh)"
|
||||||
|
@ -123,4 +123,4 @@ info "Successfully Transferred Data."
|
|||||||
|
|
||||||
# Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC
|
# Use to copy all data from a Home Assistant Core LXC to a Home Assistant Container LXC
|
||||||
# run from the Proxmox Shell
|
# run from the Proxmox Shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/copy-data/home-assistant-core-copy-data-home-assistant-core.sh)"
|
||||||
|
@ -128,4 +128,4 @@ info "Successfully Transferred Data."
|
|||||||
|
|
||||||
# Use to copy all data from one Plex Media Server LXC to another
|
# Use to copy all data from one Plex Media Server LXC to another
|
||||||
# run from the Proxmox Shell
|
# run from the Proxmox Shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/copy-data/plex-copy-data-plex.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/copy-data/plex-copy-data-plex.sh)"
|
||||||
|
@ -129,4 +129,4 @@ info "Successfully Transferred Data."
|
|||||||
|
|
||||||
# Use to copy all data from a Podman Home Assistant LXC to a Docker Home Assistant LXC.
|
# Use to copy all data from a Podman Home Assistant LXC to a Docker Home Assistant LXC.
|
||||||
# run from the Proxmox Shell
|
# run from the Proxmox Shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/copy-data/podman-home-assistant-copy-data-home-assistant-container.sh)"
|
||||||
|
@ -128,4 +128,4 @@ info "Successfully Transferred Data."
|
|||||||
|
|
||||||
# Use to copy all data from one Zigbee2MQTT LXC to another
|
# Use to copy all data from one Zigbee2MQTT LXC to another
|
||||||
# run from the Proxmox Shell
|
# run from the Proxmox Shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/copy-data/z2m-copy-data-z2m.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/copy-data/z2m-copy-data-z2m.sh)"
|
||||||
|
@ -36,7 +36,7 @@ function error_exit() {
|
|||||||
local REASON="\e[97m${1:-$DEFAULT}\e[39m"
|
local REASON="\e[97m${1:-$DEFAULT}\e[39m"
|
||||||
local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE"
|
local FLAG="\e[91m[ERROR] \e[93m$EXIT@$LINE"
|
||||||
msg "$FLAG $REASON"
|
msg "$FLAG $REASON"
|
||||||
exit $EXIT
|
exit "$EXIT"
|
||||||
}
|
}
|
||||||
function warn() {
|
function warn() {
|
||||||
local REASON="\e[97m$1\e[39m"
|
local REASON="\e[97m$1\e[39m"
|
||||||
@ -53,13 +53,13 @@ function msg() {
|
|||||||
echo -e "$TEXT"
|
echo -e "$TEXT"
|
||||||
}
|
}
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
[ -d "${CTID_FROM_PATH:-}" ] && pct unmount $CTID_FROM
|
[ -d "${CTID_FROM_PATH:-}" ] && pct unmount "$CTID_FROM"
|
||||||
[ -d "${CTID_TO_PATH:-}" ] && pct unmount $CTID_TO
|
[ -d "${CTID_TO_PATH:-}" ] && pct unmount "$CTID_TO"
|
||||||
popd >/dev/null
|
popd >/dev/null
|
||||||
rm -rf $TEMP_DIR
|
rm -rf "$TEMP_DIR"
|
||||||
}
|
}
|
||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
pushd $TEMP_DIR >/dev/null
|
pushd "$TEMP_DIR" >/dev/null
|
||||||
|
|
||||||
TITLE="Zigbee2MQTT to Z-wave JS UI Data Copy"
|
TITLE="Zigbee2MQTT to Z-wave JS UI Data Copy"
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
@ -85,27 +85,27 @@ while [ -z "${CTID_TO:+x}" ]; do
|
|||||||
done
|
done
|
||||||
for i in ${!CTID_MENU[@]}; do
|
for i in ${!CTID_MENU[@]}; do
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_FROM" ] &&
|
||||||
CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_FROM_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<"${CTID_MENU[$i + 1]}")
|
||||||
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
[ "${CTID_MENU[$i]}" == "$CTID_TO" ] &&
|
||||||
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<${CTID_MENU[$i + 1]})
|
CTID_TO_HOSTNAME=$(sed 's/[[:space:]]*$//' <<<"${CTID_MENU[$i + 1]}")
|
||||||
done
|
done
|
||||||
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
whiptail --backtitle "Proxmox VE Helper Scripts" --defaultno --title "$TITLE" --yesno \
|
||||||
"Are you sure you want to copy data between the following LXCs?
|
"Are you sure you want to copy data between the following LXCs?
|
||||||
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
$CTID_FROM (${CTID_FROM_HOSTNAME}) -> $CTID_TO (${CTID_TO_HOSTNAME})
|
||||||
Version: 2022.09.21" 13 50 || exit
|
Version: 2022.09.21" 13 50 || exit
|
||||||
info "Zwavejs2MQTT Data from '$CTID_FROM' to '$CTID_TO'"
|
info "Zwavejs2MQTT Data from '$CTID_FROM' to '$CTID_TO'"
|
||||||
if [ $(pct status $CTID_TO | sed 's/.* //') == 'running' ]; then
|
if [ $(pct status "$CTID_TO" | sed 's/.* //') == 'running' ]; then
|
||||||
msg "Stopping '$CTID_TO'..."
|
msg "Stopping '$CTID_TO'..."
|
||||||
pct stop $CTID_TO
|
pct stop "$CTID_TO"
|
||||||
fi
|
fi
|
||||||
msg "Mounting Container Disks..."
|
msg "Mounting Container Disks..."
|
||||||
DATA_PATH=/opt/zwavejs2mqtt/store/
|
DATA_PATH=/opt/zwavejs2mqtt/store/
|
||||||
DATA_PATH_NEW=/opt/zwave-js-ui/store/
|
DATA_PATH_NEW=/opt/zwave-js-ui/store/
|
||||||
CTID_FROM_PATH=$(pct mount $CTID_FROM | sed -n "s/.*'\(.*\)'/\1/p") ||
|
CTID_FROM_PATH=$(pct mount "$CTID_FROM" | sed -n "s/.*'\(.*\)'/\1/p") ||
|
||||||
die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
|
die "There was a problem mounting the root disk of LXC '${CTID_FROM}'."
|
||||||
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] ||
|
[ -d "${CTID_FROM_PATH}${DATA_PATH}" ] ||
|
||||||
die "Zwavejs2MQTT directories in '$CTID_FROM' not found."
|
die "Zwavejs2MQTT directories in '$CTID_FROM' not found."
|
||||||
CTID_TO_PATH=$(pct mount $CTID_TO | sed -n "s/.*'\(.*\)'/\1/p") ||
|
CTID_TO_PATH=$(pct mount "$CTID_TO" | sed -n "s/.*'\(.*\)'/\1/p") ||
|
||||||
die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
|
die "There was a problem mounting the root disk of LXC '${CTID_TO}'."
|
||||||
[ -d "${CTID_TO_PATH}${DATA_PATH_NEW}" ] ||
|
[ -d "${CTID_TO_PATH}${DATA_PATH_NEW}" ] ||
|
||||||
die "Zwavejs2MQTT directories in '$CTID_TO' not found."
|
die "Zwavejs2MQTT directories in '$CTID_TO' not found."
|
||||||
@ -123,11 +123,11 @@ RSYNC_OPTIONS=(
|
|||||||
--info=progress2
|
--info=progress2
|
||||||
)
|
)
|
||||||
msg "<======== Zwavejs Data ========>"
|
msg "<======== Zwavejs Data ========>"
|
||||||
rsync ${RSYNC_OPTIONS[*]} ${CTID_FROM_PATH}${DATA_PATH} ${CTID_TO_PATH}${DATA_PATH_NEW}
|
rsync "${RSYNC_OPTIONS[*]}" "${CTID_FROM_PATH}"${DATA_PATH} "${CTID_TO_PATH}"${DATA_PATH_NEW}
|
||||||
echo -en "\e[1A\e[0K\e[1A\e[0K"
|
echo -en "\e[1A\e[0K\e[1A\e[0K"
|
||||||
|
|
||||||
info "Successfully Transferred Data."
|
info "Successfully Transferred Data."
|
||||||
|
|
||||||
# Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC
|
# Use to copy all data from a Zwavejs2MQTT LXC to a Z-wave JS UI LXC
|
||||||
# run from the Proxmox Shell
|
# run from the Proxmox Shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/copy-data/zwavejs2mqtt-copy-data-zwavejsui.sh)"
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/cron-update-lxcs.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/cron-update-lxcs.sh)"
|
||||||
|
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
@ -25,7 +25,7 @@ add() {
|
|||||||
*) echo "Please answer yes or no." ;;
|
*) echo "Please answer yes or no." ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -'
|
sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -'
|
||||||
clear
|
clear
|
||||||
echo -e "\n To view Cron Update LXCs logs: cat /var/log/update-lxcs-cron.log"
|
echo -e "\n To view Cron Update LXCs logs: cat /var/log/update-lxcs-cron.log"
|
||||||
}
|
}
|
||||||
|
@ -89,5 +89,5 @@ EOF
|
|||||||
echo -e "\e[1;33m \nFinished....Reboot ${CTID} LXC to apply the changes.\n \e[0m"
|
echo -e "\e[1;33m \nFinished....Reboot ${CTID} LXC to apply the changes.\n \e[0m"
|
||||||
|
|
||||||
# In the Proxmox web shell run
|
# In the Proxmox web shell run
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/frigate-support.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/frigate-support.sh)"
|
||||||
# Reboot the LXC to apply the changes
|
# Reboot the LXC to apply the changes
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Execute within the Proxmox shell
|
# Execute within the Proxmox shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/misc/hw-acceleration.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/hw-acceleration.sh)"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
function header_info {
|
function header_info {
|
||||||
|
@ -69,7 +69,7 @@ catch_errors() {
|
|||||||
# This function handles errors
|
# This function handles errors
|
||||||
error_handler() {
|
error_handler() {
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
|
||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local exit_code="$?"
|
local exit_code="$?"
|
||||||
local line_number="$1"
|
local line_number="$1"
|
||||||
@ -110,7 +110,7 @@ msg_info() {
|
|||||||
|
|
||||||
# This function displays a success message with a green color.
|
# This function displays a success message with a green color.
|
||||||
msg_ok() {
|
msg_ok() {
|
||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR}${CM}${GN}${msg}${CL}"
|
echo -e "${BFR}${CM}${GN}${msg}${CL}"
|
||||||
@ -118,7 +118,7 @@ msg_ok() {
|
|||||||
|
|
||||||
# This function displays a error message with a red color.
|
# This function displays a error message with a red color.
|
||||||
msg_error() {
|
msg_error() {
|
||||||
if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID >/dev/null; then kill $SPINNER_PID >/dev/null; fi
|
if [ -n "$SPINNER_PID" ] && ps -p "$SPINNER_PID" >/dev/null; then kill "$SPINNER_PID" >/dev/null; fi
|
||||||
printf "\e[?25h"
|
printf "\e[?25h"
|
||||||
local msg="$1"
|
local msg="$1"
|
||||||
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
echo -e "${BFR}${CROSS}${RD}${msg}${CL}"
|
||||||
@ -132,14 +132,14 @@ setting_up_container() {
|
|||||||
echo "LANG=${locale_line}" >/etc/default/locale
|
echo "LANG=${locale_line}" >/etc/default/locale
|
||||||
locale-gen >/dev/null
|
locale-gen >/dev/null
|
||||||
export LANG=${locale_line}
|
export LANG=${locale_line}
|
||||||
echo $tz >/etc/timezone
|
echo "$tz" >/etc/timezone
|
||||||
ln -sf /usr/share/zoneinfo/$tz /etc/localtime
|
ln -sf /usr/share/zoneinfo/"$tz" /etc/localtime
|
||||||
for ((i = RETRY_NUM; i > 0; i--)); do
|
for ((i = RETRY_NUM; i > 0; i--)); do
|
||||||
if [ "$(hostname -I)" != "" ]; then
|
if [ "$(hostname -I)" != "" ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
echo 1>&2 -en "${CROSS}${RD} No Network! "
|
||||||
sleep $RETRY_EVERY
|
sleep "$RETRY_EVERY"
|
||||||
done
|
done
|
||||||
if [ "$(hostname -I)" = "" ]; then
|
if [ "$(hostname -I)" = "" ]; then
|
||||||
echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
echo 1>&2 -e "\n${CROSS}${RD} No Network After $RETRY_NUM Tries${CL}"
|
||||||
@ -265,7 +265,7 @@ EOF
|
|||||||
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
systemctl restart $(basename $(dirname $GETTY_OVERRIDE) | sed 's/\.d//')
|
||||||
msg_ok "Customized Container"
|
msg_ok "Customized Container"
|
||||||
fi
|
fi
|
||||||
echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/raw/main/ct/${app}.sh)\"" >/usr/bin/update
|
echo "bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/${app}.sh)\"" >/usr/bin/update
|
||||||
chmod +x /usr/bin/update
|
chmod +x /usr/bin/update
|
||||||
|
|
||||||
if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then
|
if [[ -n "${SSH_AUTHORIZED_KEY}" ]]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user