mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-19 12:56:01 +00:00
Compare commits
11 Commits
main
...
332f6a79df
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
332f6a79df | ||
|
|
da8cd05afa | ||
|
|
cbcbd504e3 | ||
|
|
4ae38ab9af | ||
|
|
04cfe14a9a | ||
|
|
fb34984900 | ||
|
|
b549f55cc4 | ||
|
|
43bc6dd144 | ||
|
|
5f33a02064 | ||
|
|
428ece1237 | ||
|
|
fc09585b36 |
61
ct/iventoy.sh
Normal file
61
ct/iventoy.sh
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2024 tteck
|
||||||
|
# Author: tteck (tteckster)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
_ _ __ __
|
||||||
|
(_) | / /__ ____ / /_____ __ __
|
||||||
|
/ /| | / / _ \/ __ \/ __/ __ \/ / / /
|
||||||
|
/ / | |/ / __/ / / / /_/ /_/ / /_/ /
|
||||||
|
/_/ |___/\___/_/ /_/\__/\____/\__, /
|
||||||
|
/____/
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
header_info
|
||||||
|
echo -e "Loading..."
|
||||||
|
APP="iVentoy"
|
||||||
|
var_disk="2"
|
||||||
|
var_cpu="1"
|
||||||
|
var_ram="512"
|
||||||
|
var_os="debian"
|
||||||
|
var_version="12"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function default_settings() {
|
||||||
|
CT_TYPE="0"
|
||||||
|
PW=""
|
||||||
|
CT_ID=$NEXTID
|
||||||
|
HN=$NSAPP
|
||||||
|
DISK_SIZE="$var_disk"
|
||||||
|
CORE_COUNT="$var_cpu"
|
||||||
|
RAM_SIZE="$var_ram"
|
||||||
|
BRG="vmbr0"
|
||||||
|
NET="dhcp"
|
||||||
|
GATE=""
|
||||||
|
APT_CACHER=""
|
||||||
|
APT_CACHER_IP=""
|
||||||
|
DISABLEIP6="no"
|
||||||
|
MTU=""
|
||||||
|
SD=""
|
||||||
|
NS=""
|
||||||
|
MAC=""
|
||||||
|
VLAN=""
|
||||||
|
SSH="no"
|
||||||
|
VERB="no"
|
||||||
|
echo_default
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${APP} should be reachable by going to the following URL.
|
||||||
|
${BL}http://${IP}:26000/ ${CL} \n"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
source <(curl -s https://raw.githubusercontent.com/BramSuurdje/Proxmox/main/misc/build.func)
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2024 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
|
|||||||
59
install/iventoy-install.sh
Normal file
59
install/iventoy-install.sh
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2024 tteck
|
||||||
|
# Author: tteck (tteckster)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt-get install -y curl
|
||||||
|
$STD apt-get install -y sudo
|
||||||
|
$STD apt-get install -y mc
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/ventoy/pxe/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
msg_info "Installing iVentoy v${RELEASE}"
|
||||||
|
mkdir -p /opt/iventoy/
|
||||||
|
wget -q https://github.com/ventoy/PXE/releases/download/v${RELEASE}/iventoy-${RELEASE}-linux-free.tar.gz
|
||||||
|
tar -C /tmp -xzf iventoy*.tar.gz
|
||||||
|
mv /tmp/iventoy*/* /opt/iventoy/
|
||||||
|
rm -rf iventoy*.tar.gz
|
||||||
|
msg_ok "Installed iVentoy"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
service_path="/etc/systemd/system/iventoy.service"
|
||||||
|
cat <<EOF >/etc/systemd/system/iventoy.service
|
||||||
|
[Unit]
|
||||||
|
Description =iVentoy PXE Booter
|
||||||
|
Documentation =https://www.iventoy.com
|
||||||
|
Wants =network-online.target
|
||||||
|
[Service]
|
||||||
|
Type =forking
|
||||||
|
Environment =IVENTOY_API_ALL=1
|
||||||
|
Environment =IVENTOY_AUTO_RUN=1
|
||||||
|
Environment =LIBRARY_PATH=/opt/iventoy/lib/lin64
|
||||||
|
Environment =LD_LIBRARY_PATH=/opt/iventoy/lib/lin64
|
||||||
|
ExecStart =sh ./iventoy.sh -R start
|
||||||
|
WorkingDirectory =/opt/iventoy
|
||||||
|
Restart =on-failure
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable --now iventoy.service
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt-get autoremove
|
||||||
|
$STD apt-get autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -26,12 +26,13 @@ msg_info "Setting up Node.js Repository"
|
|||||||
mkdir -p /etc/apt/keyrings
|
mkdir -p /etc/apt/keyrings
|
||||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||||
|
curl -fsSL https://bun.sh/install | bash
|
||||||
|
source /root/.bashrc
|
||||||
msg_ok "Set up Node.js Repository"
|
msg_ok "Set up Node.js Repository"
|
||||||
|
|
||||||
msg_info "Installing Node.js"
|
msg_info "Installing Node.js"
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y nodejs
|
$STD apt-get install -y nodejs
|
||||||
$STD npm install -g yarn
|
|
||||||
msg_ok "Installed Node.js"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
msg_info "Setting up postgresql"
|
msg_info "Setting up postgresql"
|
||||||
@@ -53,9 +54,9 @@ msg_ok "Set up postgresql"
|
|||||||
msg_info "Installing Umami (Patience)"
|
msg_info "Installing Umami (Patience)"
|
||||||
git clone -q https://github.com/umami-software/umami.git /opt/umami
|
git clone -q https://github.com/umami-software/umami.git /opt/umami
|
||||||
cd /opt/umami
|
cd /opt/umami
|
||||||
$STD yarn install
|
$STD bun install
|
||||||
echo -e "DATABASE_URL=postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME" >>/opt/umami/.env
|
echo -e "DATABASE_URL=postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME" >>/opt/umami/.env
|
||||||
$STD yarn run build
|
$STD bun run build
|
||||||
msg_ok "Installed Umami"
|
msg_ok "Installed Umami"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
@@ -68,7 +69,7 @@ Type=simple
|
|||||||
Restart=always
|
Restart=always
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/umami
|
WorkingDirectory=/opt/umami
|
||||||
ExecStart=/usr/bin/yarn run start
|
ExecStart=/root/.bun/bin/bun run start
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
Reference in New Issue
Block a user