mirror of https://github.com/tteck/Proxmox.git
Compare commits
No commits in common. "3e2dc1cc1cfbd2fb3ff0002d4ddd7c3396ae1c18" and "22e7ff1f175f9f7c6bfa1ea0221d4ec0e04d2afa" have entirely different histories.
3e2dc1cc1c
...
22e7ff1f17
|
@ -13,13 +13,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
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-10-18
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
|
|
||||||
- **ArchiveBox LXC** [(View Source)](https://github.com/tteck/Proxmox/blob/main/install/archivebox-install.sh)
|
|
||||||
- NEW Script
|
|
||||||
|
|
||||||
## 2024-10-15
|
## 2024-10-15
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
@ -1,86 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
|
||||||
# Author: tteck
|
|
||||||
# License: MIT
|
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
|
||||||
|
|
||||||
function header_info {
|
|
||||||
clear
|
|
||||||
cat <<"EOF"
|
|
||||||
___ __ _ ____
|
|
||||||
/ | __________/ /_ (_) _____ / __ )____ _ __
|
|
||||||
/ /| | / ___/ ___/ __ \/ / | / / _ \/ __ / __ \| |/_/
|
|
||||||
/ ___ |/ / / /__/ / / / /| |/ / __/ /_/ / /_/ /> <
|
|
||||||
/_/ |_/_/ \___/_/ /_/_/ |___/\___/_____/\____/_/|_|
|
|
||||||
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
header_info
|
|
||||||
echo -e "Loading..."
|
|
||||||
APP="ArchiveBox"
|
|
||||||
var_disk="8"
|
|
||||||
var_cpu="2"
|
|
||||||
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/archivebox ]]; 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}"
|
|
||||||
systemctl stop archivebox
|
|
||||||
msg_ok "Stopped ${APP}"
|
|
||||||
|
|
||||||
msg_info "Updating ${APP}"
|
|
||||||
cd /opt/archivebox/data
|
|
||||||
pip install --upgrade --ignore-installed archivebox
|
|
||||||
sudo -u archivebox archivebox init
|
|
||||||
msg_ok "Updated ${APP}"
|
|
||||||
|
|
||||||
msg_info "Starting ${APP}"
|
|
||||||
systemctl start archivebox
|
|
||||||
msg_ok "Started ${APP}"
|
|
||||||
|
|
||||||
msg_ok "Updated Successfully"
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
|
||||||
echo -e "${APP} should be reachable by going to the following URL.
|
|
||||||
${BL}http://${IP}:8000/admin/login${CL} \n"
|
|
125
ct/cockpit.sh
125
ct/cockpit.sh
|
@ -1,125 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
|
||||||
# Author: tteck
|
|
||||||
# Co-Author: havardthom
|
|
||||||
# License: MIT
|
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
|
||||||
|
|
||||||
function header_info {
|
|
||||||
clear
|
|
||||||
cat <<"EOF"
|
|
||||||
______ __ _ __
|
|
||||||
/ ____/___ _____/ /______ (_) /_
|
|
||||||
/ / / __ \/ ___/ //_/ __ \/ / __/
|
|
||||||
/ /___/ /_/ / /__/ ,< / /_/ / / /_
|
|
||||||
\____/\____/\___/_/|_/ .___/_/\__/
|
|
||||||
/_/
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
header_info
|
|
||||||
echo -e "Loading..."
|
|
||||||
APP="Cockpit"
|
|
||||||
var_disk="2"
|
|
||||||
var_cpu="1"
|
|
||||||
var_ram="512"
|
|
||||||
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() {
|
|
||||||
if [[ ! -d /etc/cockpit ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
|
||||||
UPD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 4 \
|
|
||||||
"1" "Update LXC" ON \
|
|
||||||
"2" "Install cockpit-file-sharing" OFF \
|
|
||||||
"3" "Install cockpit-identities" OFF \
|
|
||||||
"4" "Install cockpit-navigator" OFF \
|
|
||||||
3>&1 1>&2 2>&3)
|
|
||||||
|
|
||||||
header_info
|
|
||||||
if [ "$UPD" == "1" ]; then
|
|
||||||
msg_info "Updating ${APP} LXC"
|
|
||||||
apt-get update &>/dev/null
|
|
||||||
apt-get -y upgrade &>/dev/null
|
|
||||||
msg_ok "Updated ${APP} LXC"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
if [ "$UPD" == "2" ]; then
|
|
||||||
msg_info "Installing dependencies (patience)"
|
|
||||||
apt-get install -y attr &>/dev/null
|
|
||||||
apt-get install -y nfs-kernel-server &>/dev/null
|
|
||||||
apt-get install -y samba &>/dev/null
|
|
||||||
apt-get install -y samba-common-bin &>/dev/null
|
|
||||||
apt-get install -y winbind &>/dev/null
|
|
||||||
apt-get install -y gawk &>/dev/null
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
msg_info "Installing Cockpit file sharing"
|
|
||||||
LATEST=$(curl -s https://api.github.com/repos/45Drives/cockpit-file-sharing/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
wget -q https://github.com/45Drives/cockpit-file-sharing/releases/download/v${LATEST}/cockpit-file-sharing_${LATEST}-1focal_all.deb
|
|
||||||
dpkg -i cockpit-file-sharing_${LATEST}-1focal_all.deb &>/dev/null
|
|
||||||
rm cockpit-file-sharing_${LATEST}-1focal_all.deb
|
|
||||||
msg_ok "Installed Cockpit file sharing"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
if [ "$UPD" == "3" ]; then
|
|
||||||
msg_info "Installing dependencies (patience)"
|
|
||||||
apt-get install -y psmisc &>/dev/null
|
|
||||||
apt-get install -y samba &>/dev/null
|
|
||||||
apt-get install -y samba-common-bin &>/dev/null
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
msg_info "Installing Cockpit identities"
|
|
||||||
LATEST=$(curl -s https://api.github.com/repos/45Drives/cockpit-identities/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
wget -q https://github.com/45Drives/cockpit-identities/releases/download/v${LATEST}/cockpit-identities_${LATEST}-1focal_all.deb
|
|
||||||
dpkg -i cockpit-identities_${LATEST}-1focal_all.deb &>/dev/null
|
|
||||||
rm cockpit-identities_${LATEST}-1focal_all.deb
|
|
||||||
msg_ok "Installed Cockpit identities"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
if [ "$UPD" == "4" ]; then
|
|
||||||
msg_info "Installing dependencies"
|
|
||||||
apt-get install -y rsync &>/dev/null
|
|
||||||
apt-get install -y zip &>/dev/null
|
|
||||||
msg_ok "Installed dependencies"
|
|
||||||
msg_info "Installing Cockpit navigator"
|
|
||||||
LATEST=$(curl -s https://api.github.com/repos/45Drives/cockpit-navigator/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
|
||||||
wget -q https://github.com/45Drives/cockpit-navigator/releases/download/v${LATEST}/cockpit-navigator_${LATEST}-1focal_all.deb
|
|
||||||
dpkg -i cockpit-navigator_${LATEST}-1focal_all.deb &>/dev/null
|
|
||||||
rm cockpit-navigator_${LATEST}-1focal_all.deb
|
|
||||||
msg_ok "Installed Cockpit navigator"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
start
|
|
||||||
build_container
|
|
||||||
description
|
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
|
||||||
echo -e "${APP} should be reachable by going to the following URL.
|
|
||||||
${BL}http://${IP}:9090${CL} \n"
|
|
|
@ -1,108 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
|
||||||
# Author: tteck
|
|
||||||
# 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 \
|
|
||||||
sudo \
|
|
||||||
mc \
|
|
||||||
git \
|
|
||||||
expect \
|
|
||||||
libssl-dev \
|
|
||||||
libldap2-dev \
|
|
||||||
libsasl2-dev \
|
|
||||||
procps \
|
|
||||||
dnsutils \
|
|
||||||
ripgrep
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Installing Python Dependencies"
|
|
||||||
$STD apt-get install -y \
|
|
||||||
python3-pip \
|
|
||||||
python3-ldap \
|
|
||||||
python3-msgpack \
|
|
||||||
python3-regex
|
|
||||||
msg_ok "Installed Python 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 "Installing Playright/Chromium"
|
|
||||||
$STD pip install playwright
|
|
||||||
$STD playwright install --with-deps chromium
|
|
||||||
msg_ok "Installed Playright/Chromium"
|
|
||||||
|
|
||||||
msg_info "Installing ArchiveBox"
|
|
||||||
mkdir -p /opt/archivebox/{data,.npm,.cache,.local}
|
|
||||||
$STD adduser --system --shell /bin/bash --gecos 'Archive Box User' --group --disabled-password archivebox
|
|
||||||
chown -R archivebox:archivebox /opt/archivebox/{data,.npm,.cache,.local}
|
|
||||||
chmod -R 755 /opt/archivebox/data
|
|
||||||
$STD pip install archivebox
|
|
||||||
cd /opt/archivebox/data
|
|
||||||
expect <<EOF
|
|
||||||
set timeout -1
|
|
||||||
log_user 0
|
|
||||||
|
|
||||||
spawn sudo -u archivebox archivebox setup
|
|
||||||
|
|
||||||
expect "Username"
|
|
||||||
send "\r"
|
|
||||||
|
|
||||||
expect "Email address"
|
|
||||||
send "\r"
|
|
||||||
|
|
||||||
expect "Password"
|
|
||||||
send "helper-scripts.com\r"
|
|
||||||
|
|
||||||
expect "Password (again)"
|
|
||||||
send "helper-scripts.com\r"
|
|
||||||
|
|
||||||
expect eof
|
|
||||||
EOF
|
|
||||||
msg_ok "Installed ArchiveBox"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
|
||||||
cat <<EOF >/etc/systemd/system/archivebox.service
|
|
||||||
[Unit]
|
|
||||||
Description=ArchiveBox Server
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=archivebox
|
|
||||||
WorkingDirectory=/opt/archivebox/data
|
|
||||||
ExecStart=/usr/local/bin/archivebox server 0.0.0.0:8000
|
|
||||||
Restart=always
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
systemctl enable -q --now archivebox.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"
|
|
|
@ -1,35 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
|
||||||
# Author: tteck
|
|
||||||
# Co-Author: havardthom
|
|
||||||
# License: MIT
|
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
|
||||||
# Source: https://github.com/cockpit-project/cockpit
|
|
||||||
|
|
||||||
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"
|
|
||||||
|
|
||||||
msg_info "Installing Cockpit"
|
|
||||||
$STD apt install -y cockpit --no-install-recommends
|
|
||||||
sed -i "s/root//g" /etc/cockpit/disallowed-users
|
|
||||||
msg_ok "Installed Cockpit"
|
|
||||||
|
|
||||||
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