mirror of https://github.com/tteck/Proxmox.git
Compare commits
7 Commits
60951ff58f
...
7dca71d296
Author | SHA1 | Date |
---|---|---|
|
7dca71d296 | |
|
3a455a9e9e | |
|
c2fe080307 | |
|
814a915819 | |
|
421bccfee8 | |
|
4020e1b6ae | |
|
1a937b10f2 |
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -9,6 +9,17 @@
|
||||||
|
|
||||||
- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
||||||
|
|
||||||
|
## 2024-06-12
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- **MeTube LXC**
|
||||||
|
- NEW Script
|
||||||
|
- **Matterbridge LXC**
|
||||||
|
- NEW Script
|
||||||
|
- **Website**
|
||||||
|
- Reopen the gh-pages site (https://tteck.github.io/Proxmox/)
|
||||||
|
|
||||||
## 2024-06-11
|
## 2024-06-11
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -6,8 +6,7 @@
|
||||||
<h1 align="center">Proxmox VE Helper-Scripts</h1>
|
<h1 align="center">Proxmox VE Helper-Scripts</h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://helper-scripts.com/terms-of-use">Terms of Use</a> |
|
<a href="https://tteck.github.io/Proxmox/">Website</a> |
|
||||||
<a href="https://helper-scripts.com/">Website</a> |
|
|
||||||
<a href="https://github.com/tteck/Proxmox/blob/main/.github/CONTRIBUTING.md">Contribute</a> |
|
<a href="https://github.com/tteck/Proxmox/blob/main/.github/CONTRIBUTING.md">Contribute</a> |
|
||||||
<a href="https://github.com/tteck/Proxmox/blob/main/USER_SUBMITTED_GUIDES.md">Guides</a> |
|
<a href="https://github.com/tteck/Proxmox/blob/main/USER_SUBMITTED_GUIDES.md">Guides</a> |
|
||||||
<a href="https://github.com/tteck/Proxmox/blob/main/CHANGELOG.md">Changelog</a> |
|
<a href="https://github.com/tteck/Proxmox/blob/main/CHANGELOG.md">Changelog</a> |
|
||||||
|
|
|
@ -0,0 +1,97 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2024 tteck
|
||||||
|
# Author: MickLesk (Canbiz)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
__ ___ __ __ __ _ __
|
||||||
|
/ |/ /___ _/ /_/ /____ _____/ /_ _____(_)___/ /___ ____
|
||||||
|
/ /|_/ / __ `/ __/ __/ _ \/ ___/ __ \/ ___/ / __ / __ `/ _ \
|
||||||
|
/ / / / /_/ / /_/ /_/ __/ / / /_/ / / / / /_/ / /_/ / __/
|
||||||
|
/_/ /_/\__,_/\__/\__/\___/_/ /_.___/_/ /_/\__,_/\__, /\___/
|
||||||
|
/____/
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
header_info
|
||||||
|
echo -e "Loading..."
|
||||||
|
APP="Matterbridge"
|
||||||
|
var_disk="4"
|
||||||
|
var_cpu="1"
|
||||||
|
var_ram="1024"
|
||||||
|
var_os="debian"
|
||||||
|
var_version="12"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function default_settings() {
|
||||||
|
CT_TYPE="1"
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
if [[ ! -d /opt/matterbridge ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
|
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/Luligu/matterbridge/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3)}')
|
||||||
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
|
msg_info "Stopping ${APP} Service"
|
||||||
|
systemctl stop matterbridge
|
||||||
|
msg_ok "Stopped ${APP} Service"
|
||||||
|
|
||||||
|
msg_info "Updating ${APP} to ${RELEASE}"
|
||||||
|
cd /opt/matterbridge
|
||||||
|
wget -q "https://github.com/Luligu/matterbridge/archive/refs/tags/${RELEASE}.zip"
|
||||||
|
unzip -q ${RELEASE}.zip
|
||||||
|
mv matterbridge-${RELEASE} /opt/matterbridge
|
||||||
|
cd /opt/matterbridge
|
||||||
|
npm ci >/dev/null 2>&1
|
||||||
|
npm run build >/dev/null 2>&1
|
||||||
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
|
msg_ok "Updated ${APP} to ${RELEASE}"
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm /opt/${RELEASE}.zip
|
||||||
|
msg_ok "Cleaned"
|
||||||
|
|
||||||
|
msg_info "Starting ${APP} Service"
|
||||||
|
systemctl start matterbridge
|
||||||
|
sleep 1
|
||||||
|
msg_ok "Started ${APP} Service"
|
||||||
|
msg_ok "Updated Successfully!\n"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${APP} Setup should be reachable by going to the following URL.
|
||||||
|
${BL}http://${IP}:8283${CL} \n"
|
|
@ -0,0 +1,100 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2024 tteck
|
||||||
|
# Author: MickLesk (Canbiz)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
|
||||||
|
function header_info {
|
||||||
|
clear
|
||||||
|
cat <<"EOF"
|
||||||
|
__ ___ ______ __
|
||||||
|
/ |/ /__/_ __/_ __/ /_ ___
|
||||||
|
/ /|_/ / _ \/ / / / / / __ \/ _ \
|
||||||
|
/ / / / __/ / / /_/ / /_/ / __/
|
||||||
|
/_/ /_/\___/_/ \__,_/_.___/\___/
|
||||||
|
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
header_info
|
||||||
|
echo -e "Loading..."
|
||||||
|
APP="MeTube"
|
||||||
|
var_disk="10"
|
||||||
|
var_cpu="1"
|
||||||
|
var_ram="1024"
|
||||||
|
var_os="debian"
|
||||||
|
var_version="12"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function default_settings() {
|
||||||
|
CT_TYPE="1"
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
if [[ ! -d /opt/metube ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||||
|
if (( $(df /boot | awk 'NR==2{gsub("%","",$5); print $5}') > 80 )); then
|
||||||
|
read -r -p "Warning: Storage is dangerously low, continue anyway? <y/N> " prompt
|
||||||
|
[[ ${prompt,,} =~ ^(y|yes)$ ]] || exit
|
||||||
|
fi
|
||||||
|
msg_info "Stopping ${APP} Service"
|
||||||
|
systemctl stop metube
|
||||||
|
msg_ok "Stopped ${APP} Service"
|
||||||
|
|
||||||
|
msg_info "Updating ${APP} to latest Git"
|
||||||
|
cd /opt
|
||||||
|
if [ -d metube_bak ]; then
|
||||||
|
rm -rf metube_bak
|
||||||
|
fi
|
||||||
|
mv metube metube_bak
|
||||||
|
git clone https://github.com/alexta69/metube /opt/metube >/dev/null 2>&1
|
||||||
|
cd /opt/metube/ui
|
||||||
|
npm install >/dev/null 2>&1
|
||||||
|
node_modules/.bin/ng build >/dev/null 2>&1
|
||||||
|
cd /opt/metube
|
||||||
|
cp /opt/metube_bak/.env /opt/metube/
|
||||||
|
pip3 install pipenv >/dev/null 2>&1
|
||||||
|
pipenv install >/dev/null 2>&1
|
||||||
|
|
||||||
|
if [ -d "/opt/metube_bak" ]; then
|
||||||
|
rm -rf /opt/metube_bak
|
||||||
|
fi
|
||||||
|
msg_ok "Updated ${APP} to latest Git"
|
||||||
|
|
||||||
|
msg_info "Starting ${APP} Service"
|
||||||
|
systemctl start metube
|
||||||
|
sleep 1
|
||||||
|
msg_ok "Started ${APP} Service"
|
||||||
|
msg_ok "Updated Successfully!\n"
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${APP} Setup should be reachable by going to the following URL.
|
||||||
|
${BL}http://${IP}:8081${CL} \n"
|
|
@ -36,6 +36,7 @@ msg_info "Installing Calibre-Web"
|
||||||
mkdir -p /opt/calibre-web
|
mkdir -p /opt/calibre-web
|
||||||
$STD wget https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -P /opt/calibre-web
|
$STD wget https://github.com/janeczku/calibre-web/raw/master/library/metadata.db -P /opt/calibre-web
|
||||||
$STD pip install calibreweb
|
$STD pip install calibreweb
|
||||||
|
$STD pip install jsonschema
|
||||||
msg_ok "Installed Calibre-Web"
|
msg_ok "Installed Calibre-Web"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2024 tteck
|
||||||
|
# Author: tteck
|
||||||
|
# Co-Author: MickLesk (Canbiz)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/Luligu/matterbridge/
|
||||||
|
|
||||||
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies (Patience)"
|
||||||
|
$STD apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
unzip \
|
||||||
|
curl \
|
||||||
|
sudo \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
gnupg \
|
||||||
|
ca-certificates \
|
||||||
|
mc
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up Node.js Repository"
|
||||||
|
mkdir -p /etc/apt/keyrings
|
||||||
|
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
|
||||||
|
msg_ok "Set up Node.js Repository"
|
||||||
|
|
||||||
|
msg_info "Installing Node.js"
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get install -y nodejs
|
||||||
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
|
msg_info "Install Matterbridge"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/Luligu/matterbridge/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
wget -q "https://github.com/Luligu/matterbridge/archive/refs/tags/${RELEASE}.zip"
|
||||||
|
unzip -q ${RELEASE}.zip
|
||||||
|
mv matterbridge-${RELEASE} /opt/matterbridge
|
||||||
|
rm -R ${RELEASE}.zip
|
||||||
|
cd /opt/matterbridge
|
||||||
|
$STD npm ci
|
||||||
|
$STD npm run build
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
msg_ok "Installed Matterbridge"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/matterbridge.service
|
||||||
|
[Unit]
|
||||||
|
Description=matterbridge
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/npm run start:bridge
|
||||||
|
WorkingDirectory=/opt/matterbridge
|
||||||
|
StandardOutput=inherit
|
||||||
|
StandardError=inherit
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10s
|
||||||
|
TimeoutStopSec=30s
|
||||||
|
User=root
|
||||||
|
Environment=PATH=/usr/bin:/usr/local/bin:/opt/matterbridge/bin
|
||||||
|
Environment=NODE_ENV=production
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now matterbridge.service
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
|
@ -0,0 +1,98 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2024 tteck
|
||||||
|
# Author: tteck
|
||||||
|
# Co-Author: MickLesk (Canbiz)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/alexta69/metube
|
||||||
|
|
||||||
|
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 --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
curl \
|
||||||
|
aria2 \
|
||||||
|
coreutils \
|
||||||
|
gcc \
|
||||||
|
g++ \
|
||||||
|
musl-dev \
|
||||||
|
sudo \
|
||||||
|
ffmpeg \
|
||||||
|
git \
|
||||||
|
make \
|
||||||
|
gnupg \
|
||||||
|
ca-certificates \
|
||||||
|
mc
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing Python3"
|
||||||
|
$STD apt-get install -y \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv
|
||||||
|
msg_ok "Installed Python3"
|
||||||
|
|
||||||
|
msg_info "Setting up Node.js Repository"
|
||||||
|
mkdir -p /etc/apt/keyrings
|
||||||
|
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
|
||||||
|
msg_ok "Set up Node.js Repository"
|
||||||
|
|
||||||
|
msg_info "Installing Node.js"
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get install -y nodejs
|
||||||
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
|
msg_info "Installing MeTube"
|
||||||
|
$STD git clone https://github.com/alexta69/metube /opt/metube
|
||||||
|
cd /opt/metube/ui
|
||||||
|
$STD npm install
|
||||||
|
$STD node_modules/.bin/ng build
|
||||||
|
cd /opt/metube
|
||||||
|
$STD pip3 install pipenv
|
||||||
|
$STD pipenv install
|
||||||
|
mkdir -p /opt/metube_downloads /opt/metube_downloads/.metube /opt/metube_downloads/music /opt/metube_downloads/videos
|
||||||
|
cat <<EOF >/opt/metube/.env
|
||||||
|
DOWNLOAD_DIR=/opt/metube_downloads
|
||||||
|
STATE_DIR=/opt/metube_downloads/.metube
|
||||||
|
TEMP_DIR=/opt/metube_downloads
|
||||||
|
YTDL_OPTIONS={"trim_file_name":10}
|
||||||
|
EOF
|
||||||
|
msg_ok "Installed MeTube"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/metube.service
|
||||||
|
[Unit]
|
||||||
|
Description=Metube - YouTube Downloader
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/opt/metube
|
||||||
|
EnvironmentFile=/opt/metube/.env
|
||||||
|
ExecStart=/usr/local/bin/pipenv run python3 app/main.py
|
||||||
|
Restart=always
|
||||||
|
User=root
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now metube.service
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
Loading…
Reference in New Issue