forked from forkanization/Proxmox-arm64
Merge branch 'upstream-merge' of https://github.com/asylumexp/Proxmox into upstream-merge
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2024 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# Co-Author: MickLesk
|
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/asylumexp/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
# This function sets color variables for formatting output in the terminal
|
# This function sets color variables for formatting output in the terminal
|
||||||
color() {
|
color() {
|
||||||
@@ -150,7 +149,7 @@ motd_ssh() {
|
|||||||
MOTD_FILE="/etc/motd"
|
MOTD_FILE="/etc/motd"
|
||||||
if [ -f "$MOTD_FILE" ]; then
|
if [ -f "$MOTD_FILE" ]; then
|
||||||
echo -e "\n${BOLD}${APPLICATION} LXC Container${CL}" > "$MOTD_FILE"
|
echo -e "\n${BOLD}${APPLICATION} LXC Container${CL}" > "$MOTD_FILE"
|
||||||
echo -e "${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| Project: ${GN}ProxmoxVE ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\n" >> "$MOTD_FILE"
|
echo -e "${TAB}${GATEWAY}${YW} Provided by: ${GN}community-scripts ORG ${YW}| Project: ${GN}ProxmoxVE ${YW}| GitHub: ${GN}https://github.com/asylumexp/Proxmox${CL}\n" >> "$MOTD_FILE"
|
||||||
echo -e "${TAB}${OS}${YW} OS: ${GN}${OS_NAME} ${OS_VERSION}${CL}" >> "$MOTD_FILE"
|
echo -e "${TAB}${OS}${YW} OS: ${GN}${OS_NAME} ${OS_VERSION}${CL}" >> "$MOTD_FILE"
|
||||||
echo -e "${TAB}${HOSTNAME}${YW} Hostname: ${GN}$(hostname)${CL}" >> "$MOTD_FILE"
|
echo -e "${TAB}${HOSTNAME}${YW} Hostname: ${GN}$(hostname)${CL}" >> "$MOTD_FILE"
|
||||||
echo -e "${TAB}${INFO}${YW} IP Address: ${GN}${IP}${CL}" >> "$MOTD_FILE"
|
echo -e "${TAB}${INFO}${YW} IP Address: ${GN}${IP}${CL}" >> "$MOTD_FILE"
|
||||||
|
|||||||
+14
-16
@@ -1,8 +1,7 @@
|
|||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2024 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# Co-Author: MickLesk
|
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/asylumexp/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
variables() {
|
variables() {
|
||||||
NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
|
NSAPP=$(echo ${APP,,} | tr -d ' ') # This function sets the NSAPP variable by converting the value of the APP variable to lowercase and removing any spaces.
|
||||||
@@ -148,9 +147,9 @@ fi
|
|||||||
|
|
||||||
# This function checks the system architecture and exits if it's not "amd64".
|
# This function checks the system architecture and exits if it's not "amd64".
|
||||||
arch_check() {
|
arch_check() {
|
||||||
if [ "$(dpkg --print-architecture)" != "amd64" ]; then
|
if [ "$(dpkg --print-architecture)" != "arm64" ]; then
|
||||||
echo -e "\n ${INFO}${YWB}This script will not work with PiMox! \n"
|
echo -e "\n ${INFO}${YWB}This script will not work on non arm64 systems! \n"
|
||||||
echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for ARM64 support. \n"
|
echo -e "\n ${YWB}Visit https://github.com/asylumexp/Proxmox for AMD64 support. \n"
|
||||||
echo -e "Exiting..."
|
echo -e "Exiting..."
|
||||||
sleep 2
|
sleep 2
|
||||||
exit
|
exit
|
||||||
@@ -204,7 +203,7 @@ header_info() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
temp_dir=$(mktemp -d)
|
temp_dir=$(mktemp -d)
|
||||||
curl -sL https://github.com/community-scripts/ProxmoxVE/raw/refs/heads/main/misc/figlet.tar.xz -o "$temp_dir/figlet.tar.xz"
|
curl -sL https://github.com/asylumexp/Proxmox/raw/refs/heads/main/misc/figlet.tar.xz -o "$temp_dir/figlet.tar.xz"
|
||||||
mkdir -p /tmp/figlet
|
mkdir -p /tmp/figlet
|
||||||
tar -xf "$temp_dir/figlet.tar.xz" -C /tmp/figlet --strip-components=1
|
tar -xf "$temp_dir/figlet.tar.xz" -C /tmp/figlet --strip-components=1
|
||||||
cd /tmp/figlet
|
cd /tmp/figlet
|
||||||
@@ -640,7 +639,6 @@ install_script() {
|
|||||||
pve_check
|
pve_check
|
||||||
shell_check
|
shell_check
|
||||||
root_check
|
root_check
|
||||||
arch_check
|
|
||||||
ssh_check
|
ssh_check
|
||||||
|
|
||||||
if systemctl is-active -q ping-instances.service; then
|
if systemctl is-active -q ping-instances.service; then
|
||||||
@@ -769,9 +767,9 @@ build_container() {
|
|||||||
TEMP_DIR=$(mktemp -d)
|
TEMP_DIR=$(mktemp -d)
|
||||||
pushd $TEMP_DIR >/dev/null
|
pushd $TEMP_DIR >/dev/null
|
||||||
if [ "$var_os" == "alpine" ]; then
|
if [ "$var_os" == "alpine" ]; then
|
||||||
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/alpine-install.func)"
|
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/alpine-install.func)"
|
||||||
else
|
else
|
||||||
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/install.func)"
|
export FUNCTIONS_FILE_PATH="$(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/install.func)"
|
||||||
fi
|
fi
|
||||||
export CACHER="$APT_CACHER"
|
export CACHER="$APT_CACHER"
|
||||||
export CACHER_IP="$APT_CACHER_IP"
|
export CACHER_IP="$APT_CACHER_IP"
|
||||||
@@ -801,7 +799,7 @@ build_container() {
|
|||||||
$PW
|
$PW
|
||||||
"
|
"
|
||||||
# This executes create_lxc.sh and creates the container and .conf file
|
# This executes create_lxc.sh and creates the container and .conf file
|
||||||
bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/create_lxc.sh)" || exit
|
bash -c "$(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/ct/create_lxc.sh)" || exit
|
||||||
|
|
||||||
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
|
||||||
if [ "$CT_TYPE" == "0" ]; then
|
if [ "$CT_TYPE" == "0" ]; then
|
||||||
@@ -863,7 +861,7 @@ http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
|
|||||||
EOF'
|
EOF'
|
||||||
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
|
pct exec "$CTID" -- ash -c "apk add bash >/dev/null"
|
||||||
fi
|
fi
|
||||||
lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/install/$var_install.sh)" || exit
|
lxc-attach -n "$CTID" -- bash -c "$(wget -qLO - https://raw.githubusercontent.com/asylumexp/Proxmox/main/install/$var_install.sh)" || exit
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -874,8 +872,8 @@ description() {
|
|||||||
# Generate LXC Description
|
# Generate LXC Description
|
||||||
DESCRIPTION=$(cat <<EOF
|
DESCRIPTION=$(cat <<EOF
|
||||||
<div align='center'>
|
<div align='center'>
|
||||||
<a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'>
|
<a href='https://pimox-scripts.com' target='_blank' rel='noopener noreferrer'>
|
||||||
<img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
<img src='https://raw.githubusercontent.com/asylumexp/ProxmoxVE/main/misc/images/logo-81x112.png' alt='Logo' style='width:81px;height:112px;'/>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<h2 style='font-size: 24px; margin: 20px 0;'>${APP} LXC</h2>
|
<h2 style='font-size: 24px; margin: 20px 0;'>${APP} LXC</h2>
|
||||||
@@ -888,15 +886,15 @@ description() {
|
|||||||
|
|
||||||
<span style='margin: 0 10px;'>
|
<span style='margin: 0 10px;'>
|
||||||
<i class="fa fa-github fa-fw" style="color: #f5f5f5;"></i>
|
<i class="fa fa-github fa-fw" style="color: #f5f5f5;"></i>
|
||||||
<a href='https://github.com/community-scripts/ProxmoxVE' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>GitHub</a>
|
<a href='https://github.com/asylumexp/Proxmox' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>GitHub</a>
|
||||||
</span>
|
</span>
|
||||||
<span style='margin: 0 10px;'>
|
<span style='margin: 0 10px;'>
|
||||||
<i class="fa fa-comments fa-fw" style="color: #f5f5f5;"></i>
|
<i class="fa fa-comments fa-fw" style="color: #f5f5f5;"></i>
|
||||||
<a href='https://github.com/community-scripts/ProxmoxVE/discussions' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>Discussions</a>
|
<a href='https://github.com/asylumexp/Proxmox/discussions' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>Discussions</a>
|
||||||
</span>
|
</span>
|
||||||
<span style='margin: 0 10px;'>
|
<span style='margin: 0 10px;'>
|
||||||
<i class="fa fa-exclamation-circle fa-fw" style="color: #f5f5f5;"></i>
|
<i class="fa fa-exclamation-circle fa-fw" style="color: #f5f5f5;"></i>
|
||||||
<a href='https://github.com/community-scripts/ProxmoxVE/issues' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>Issues</a>
|
<a href='https://github.com/asylumexp/Proxmox/issues' target='_blank' rel='noopener noreferrer' style='text-decoration: none; color: #00617f;'>Issues</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user