Update switch_from_VED_to_VE.sh
This commit is contained in:
parent
0a841a949a
commit
aa4ff86ccc
@ -51,30 +51,20 @@ function update_motd() {
|
|||||||
echo -e "${BL}[Info]${GN} Updating MOTD in ${BL}$container${CL} (OS: ${GN}$os${CL})"
|
echo -e "${BL}[Info]${GN} Updating MOTD in ${BL}$container${CL} (OS: ${GN}$os${CL})"
|
||||||
|
|
||||||
pct exec "$container" -- bash -c '
|
pct exec "$container" -- bash -c '
|
||||||
YW="\033[33m"
|
|
||||||
GN="\033[1;92m"
|
|
||||||
CL="\033[m"
|
|
||||||
TAB=" "
|
|
||||||
GATEWAY="🌐"
|
|
||||||
OS="🖥️"
|
|
||||||
HOSTNAME="🏠"
|
|
||||||
INFO="💡"
|
|
||||||
PROFILE_FILE="/etc/profile.d/00_motd.sh"
|
PROFILE_FILE="/etc/profile.d/00_motd.sh"
|
||||||
|
|
||||||
echo "echo -e \"\"" > "$PROFILE_FILE"
|
echo "echo -e \"\"" > "$PROFILE_FILE"
|
||||||
echo "echo -e \"${TAB}${GATEWAY}${TAB}${YW} Provided by: ${GN}community-scripts ORG ${YW}| GitHub: ${GN}https://github.com/community-scripts/ProxmoxVE${CL}\"" >> "$PROFILE_FILE"
|
echo "echo -e \" 🌐 Provided by: community-scripts ORG | GitHub: https://github.com/community-scripts/ProxmoxVE \"" >> "$PROFILE_FILE"
|
||||||
echo "echo \"\"" >> "$PROFILE_FILE"
|
echo "echo \"\"" >> "$PROFILE_FILE"
|
||||||
echo "echo -e \"${TAB}${OS}${TAB}${YW} OS: ${GN}$(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '\"') - Version: $(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '\"')${CL}\"" >> "$PROFILE_FILE"
|
echo "echo -e \" 🖥️ OS: $(grep ^NAME /etc/os-release | cut -d= -f2 | tr -d '\"') - Version: $(grep ^VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '\"') \"" >> "$PROFILE_FILE"
|
||||||
echo "echo -e \"${TAB}${HOSTNAME}${TAB}${YW} Hostname: ${GN}$(hostname)${CL}\"" >> "$PROFILE_FILE"
|
echo "echo -e \" 🏠 Hostname: $(hostname) \"" >> "$PROFILE_FILE"
|
||||||
echo "echo -e \"${TAB}${INFO}${TAB}${YW} IP Address: ${GN}$(hostname -I | awk '\''{print $1}'\'')${CL}\"" >> "$PROFILE_FILE"
|
echo "echo -e \" 💡 IP Address: $(hostname -I | awk '\''{print $1}'\'') \"" >> "$PROFILE_FILE"
|
||||||
|
|
||||||
chmod -x /etc/update-motd.d/*
|
chmod -x /etc/update-motd.d/*
|
||||||
'
|
'
|
||||||
|
|
||||||
elif [[ "$os" == "alpine" ]]; then
|
elif [[ "$os" == "alpine" ]]; then
|
||||||
echo -e "${BL}[Info]${GN} Updating MOTD in ${BL}$container${CL} (OS: ${GN}$os${CL})"
|
echo -e "${BL}[Info]${GN} Updating MOTD in ${BL}$container${CL} (OS: ${GN}$os${CL})"
|
||||||
|
|
||||||
pct exec "$container" -- bash -c '
|
pct exec "$container" -- /bin/sh -c '
|
||||||
echo "export TERM='\''xterm-256color'\''" >> /root/.bashrc
|
echo "export TERM='\''xterm-256color'\''" >> /root/.bashrc
|
||||||
IP=$(ip -4 addr show eth0 | awk "/inet / {print $2}" | cut -d/ -f1 | head -n 1)
|
IP=$(ip -4 addr show eth0 | awk "/inet / {print $2}" | cut -d/ -f1 | head -n 1)
|
||||||
PROFILE_FILE="/etc/profile.d/00_lxc-details.sh"
|
PROFILE_FILE="/etc/profile.d/00_lxc-details.sh"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user