Files

61 lines
2.0 KiB
Bash
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
APPNAME="Arch Linux"
OS="Arch Linux"
if [[ "$1" == "--update" ]]; then
echo -e "\033[38;5;45m Checking Updates $APPNAME $OS....\033[0m"
eval "$(curl -fsSL https://git.dynastyrevolution.com/DYNR/DynastyRevolution-Scripts/raw/branch/main/core/OS_handler.func)"
echo -e "\033[38;5;45m Installing dependencies....\033[0m"
$PKG_UPDATE >/dev/null 2>&1
$PKG_INSTALL curl wget git sudo
echo -e "\033[38;5;178m✅ Update Complete, $APPNAME $OS.\033[0m"
exit 0
fi
eval "$(curl -fsSL https://git.dynastyrevolution.com/DYNR/DynastyRevolution-Scripts/raw/branch/main/core/OS_handler.func)"
eval "$(curl -fsSL https://git.dynastyrevolution.com/DYNR/DynastyRevolution-Scripts/raw/branch/main/core/build.func)"
APP="Arch Linux"
VERSION="base"
MODULE_PATH="modules/provision/operating-systems/archlinux-lxc.sh"
var_tags="os;base"
var_cpu="1"
var_ram="1024"
var_disk="4"
var_os="archlinux"
var_version="base"
var_tz="host"
start
msg_info "Grounding $OS_CHOICE...."
cat << 'EOF' > /tmp/dynr_install.sh
eval "$(curl -fsSL https://git.dynastyrevolution.com/DYNR/DynastyRevolution-Scripts/raw/branch/main/core/OS_handler.func)"
$PKG_UPDATE >/dev/null 2>&1
$PKG_INSTALL curl wget git sudo >/dev/null 2>&1
cat << 'UPDATE' > /usr/local/bin/update
#!/usr/bin/env bash
curl -fsSL https://git.dynastyrevolution.com/DYNR/DynastyRevolution-Scripts/raw/branch/main/modules/provision/operating-systems/archlinux-lxc.sh | bash -s -- --update
UPDATE
chmod +x /usr/local/bin/update
EOF
msg_info "Welding OS into LXC $CT_ID...."
pct push "$CT_ID" /tmp/dynr_install.sh /root/dynr_install.sh
msg_info "Sanding Provision...."
manifest_provision pct exec "$CT_ID" -- bash /root/dynr_install.sh
pct exec "$CT_ID" -- rm /root/dynr_install.sh
rm /tmp/dynr_install.sh
header_info
echo -e "${CM}${BG}Provison Successful: ${HN}${BC}"
pct start $CT_ID
echo -e "${TAB}${VM_IP} or ${CT_ID} ${BC}"
echo -e "${TAB} Run 'cat /opt/urls.txt' to get ports of Installed apps or IP Address.${BC}"
echo -e "\n${BG}${BOLD}Firing on all cylinders.${BC}\n"