Merge branch 'main' into cassandra

This commit is contained in:
Madhur Ahuja 2024-01-20 10:05:51 +05:30
commit 5ab75cb856
14 changed files with 174 additions and 36 deletions

View File

@ -7,6 +7,27 @@
- 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-01-17
### Changed
- **ntfy LXC**
- NEW Script
- **HyperHDR LXC**
- NEW Script
## 2024-01-16
### Changed
- **Website Improvements**
- Refine and correct pointers.
- Change hover colors to intuitively indicate categories/items.
- Implement opening links in new tabs for better navigation.
- Enhance the Copy button to better indicate that the command has been successfully copied.
- Introduce a Clear Search button.
- While not directly related to the website, it's worth mentioning that the logo in newly created LXC notes now serves as a link to the website, conveniently opening in a new tab.
## 2024-01-12
### Changed

70
ct/hyperhdr.sh Normal file
View File

@ -0,0 +1,70 @@
#!/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="HyperHDR"
var_disk="4"
var_cpu="2"
var_ram="2048"
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=""
DISABLEIP6="no"
MTU=""
SD=""
NS=""
MAC=""
VLAN=""
SSH="no"
VERB="no"
echo_default
}
function update_script() {
header_info
if [[ ! -d /var ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
msg_ok "Updated $APP LXC"
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}:8090${CL} \n"

View File

@ -136,6 +136,7 @@ function update_script() {
msg_info "Building Frontend"
cd ./frontend
export NODE_ENV=development
yarn add -D sass-loader@10.5.2 &>/dev/null
yarn install --network-timeout=30000 &>/dev/null
yarn build &>/dev/null
cp -r dist/* /app/frontend
@ -185,4 +186,5 @@ description
msg_ok "Completed Successfully!\n"
echo -e "${APP} should be reachable by going to the following URL.
${BL}http://${IP}:81${CL} \n"
${BL}http://${IP}:81${CL}
${RD}Reboot LXC if no GUI${CL}\n"

View File

@ -56,26 +56,17 @@ function update_script() {
header_info
if [[ ! -d /opt/tplink ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1)
latest_version=$(basename "${latest_url}" | sed -e 's/.*ller_//;s/_Li.*//')
latest_version=$(basename "${latest_url}")
if [ -z "${latest_version}" ]; then
msg_error "It seems that the server (tp-link.com) might be down. Please try again at a later time."
exit
fi
installed_version=$(dpkg -l | grep omada | awk '{print $3}')
if [ "v${installed_version}" = "${latest_version}" ]; then
msg_info "Installed version (v${installed_version}) is the same as the latest version (${latest_version})"
sleep 2
msg_ok "Omada Controller is already up to date"
exit
else
echo -e "Updating Omada Controller to ${latest_version}"
wget -qL ${latest_url}
dpkg -i Omada_SDN_Controller_${latest_version}_Linux_x64.deb
rm -rf Omada_SDN_Controller_${latest_version}_Linux_x64.deb
echo -e "Updated Omada Controller to ${latest_version}"
echo -e "Updating Omada Controller"
wget -qL ${latest_url}
dpkg -i ${latest_version}
rm -rf ${latest_version}
echo -e "Updated Omada Controller"
exit
fi
}
start

View File

@ -23,7 +23,13 @@ msg_ok "Installed Dependencies"
msg_info "Installing Alpine-Zigbee2MQTT"
$STD apk add zigbee2mqtt
mkdir -p /root/.z2m
ln -s /etc/zigbee2mqtt/ /root/.z2m
chown -R root:root /etc/zigbee2mqtt /root/.z2m
sed -i -e 's/#datadir="\/var\/lib\/zigbee2mqtt"/datadir="\/etc\/zigbee2mqtt"/' -e 's/#command_user="zigbee2mqtt"/command_user="root"/' /etc/conf.d/zigbee2mqtt
$STD rc-update add zigbee2mqtt
$STD rc-service zigbee2mqtt restart
msg_ok "Installed Alpine-Zigbee2MQTT"
motd_ssh
customize
customize

View File

@ -21,7 +21,7 @@ msg_ok "Installed Dependencies"
msg_info "Installing Apt-Cacher NG"
DEBIAN_FRONTEND=noninteractive $STD apt-get -o Dpkg::Options::="--force-confold" install -y apt-cacher-ng
sed -i 's/# PassThroughPattern: .* # this would allow CONNECT to everything/PassThroughPattern: .* /' /etc/apt-cacher-ng/acng.conf
sed -i 's/# PassThroughPattern: .* # this would allow CONNECT to everything/PassThroughPattern: .*/' /etc/apt-cacher-ng/acng.conf
systemctl enable -q --now apt-cacher-ng
msg_ok "Installed Apt-Cacher NG"

View File

@ -0,0 +1,55 @@
#!/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
$STD apt-get install -y gpg
msg_ok "Installed Dependencies"
msg_info "Installing HyperHDR"
curl -fsSL https://awawa-dev.github.io/hyperhdr.public.apt.gpg.key >/usr/share/keyrings/hyperhdr.public.apt.gpg.key
chmod go+r /usr/share/keyrings/hyperhdr.public.apt.gpg.key
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hyperhdr.public.apt.gpg.key] https://awawa-dev.github.io $(awk -F= '/VERSION_CODENAME/ {print $2}' /etc/os-release) main" >/etc/apt/sources.list.d/hyperhdr.list
$STD apt-get update
$STD apt-get install -y hyperhdr
msg_ok "Installed HyperHDR"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/hyperhdr.service
[Unit]
Description=HyperHDR Service
After=syslog.target network.target
[Service]
Restart=on-failure
RestartSec=5
Type=simple
ExecStart=/usr/bin/hyperhdr
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now hyperhdr
msg_ok "Created Service"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"

View File

@ -134,6 +134,7 @@ msg_ok "Set up Enviroment"
msg_info "Building Frontend"
cd ./frontend
export NODE_ENV=development
$STD yarn add -D sass-loader@10.5.2
$STD yarn install --network-timeout=30000
$STD yarn build
cp -r dist/* /app/frontend

View File

@ -37,18 +37,18 @@ $STD dpkg -i mongodb-org-server_3.6.23_amd64.deb
msg_ok "Installed MongoDB"
latest_url=$(curl -fsSL "https://www.tp-link.com/us/support/download/omada-software-controller/" | grep -o 'https://.*x64.deb' | head -n1)
latest_version=$(basename "$latest_url" | sed -e 's/.*ller_//;s/_Li.*//')
latest_version=$(basename "$latest_url")
msg_info "Installing Omada Controller ${latest_version}"
msg_info "Installing Omada Controller"
wget -qL ${latest_url}
$STD dpkg -i Omada_SDN_Controller_${latest_version}_Linux_x64.deb
msg_ok "Installed Omada Controller ${latest_version}"
$STD dpkg -i ${latest_version}
msg_ok "Installed Omada Controller"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf Omada_SDN_Controller_${latest_version}_Linux_x64.deb mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb
rm -rf ${latest_version} mongodb-org-server_3.6.23_amd64.deb zulu-repo_1.0.0-3_all.deb libssl1.1_1.1.1f-1ubuntu2.20_amd64.deb
$STD apt-get autoremove
$STD apt-get autoclean
msg_ok "Cleaned"

View File

@ -21,10 +21,7 @@ $STD apt-get install -y sqlite3
msg_ok "Installed Dependencies"
msg_info "Installing Sonarr v4"
$STD groupadd media
$STD adduser --system --no-create-home --ingroup media sonarr
mkdir -p /var/lib/sonarr/
chown -R sonarr:media /var/lib/sonarr/
chmod 775 /var/lib/sonarr/
wget -q -O SonarrV4.tar.gz 'https://services.sonarr.tv/v1/download/main/latest?version=4&os=linux&arch=x64'
tar -xzf SonarrV4.tar.gz
@ -39,9 +36,6 @@ cat <<EOF >/etc/systemd/system/sonarr.service
Description=Sonarr Daemon
After=syslog.target network.target
[Service]
User=sonarr
Group=media
UMask=0002
Type=simple
ExecStart=/opt/Sonarr/Sonarr -nobrowser -data=/var/lib/sonarr/
TimeoutStopSec=20

View File

@ -50,7 +50,9 @@ fi
msg_info "Installing Zigbee2MQTT"
cd /opt/zigbee2mqtt
if [[ $DEV == "y" ]]; then
$STD git fetch origin dev:dev
$STD git checkout dev
$STD git pull
fi
$STD npm ci
msg_ok "Installed Zigbee2MQTT"

View File

@ -71,10 +71,6 @@ setting_up_container() {
echo -e " 🖧 Check Network Settings"
exit 1
fi
cat <<EOF >/etc/apk/repositories
https://dl-cdn.alpinelinux.org/alpine/latest-stable/main
https://dl-cdn.alpinelinux.org/alpine/latest-stable/community
EOF
msg_ok "Set up Container OS"
msg_ok "Network Connected: ${BL}$(ip addr show | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1 | tail -n1)${CL}"
}

View File

@ -95,7 +95,7 @@ uninstall() {
}
if ! pveversion | grep -Eq "pve-manager/(8\.[0-9])"; then
msg_error "This version of Proxmox Virtual Environment is not supported"
echo -e "This version of Proxmox Virtual Environment is not supported"
echo -e "Requires PVE Version 8.0 or higher"
echo -e "Exiting..."
sleep 2

View File

@ -75,7 +75,7 @@ fi
function spinner() {
printf "\e[?25l"
spinner="/-\\|/-\\|"
spinner="◐◓◑◒"
spin_i=0
while true; do
printf "\b%s" "${spinner:spin_i++%${#spinner}:1}"
@ -449,7 +449,7 @@ qm set $VMID \
-efidisk0 ${DISK0_REF}${FORMAT} \
-scsi0 ${DISK1_REF},${DISK_CACHE}${THIN}size=32G \
-boot order=scsi0 \
-description "<div align='center'><a href='https://Helper-Scripts.com'><img src='https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/logo-81x112.png'/></a>
-description "<div align='center'><a href='https://Helper-Scripts.com' target='_blank' rel='noopener noreferrer'><img src='https://raw.githubusercontent.com/tteck/Proxmox/main/misc/images/logo-81x112.png'/></a>
# Home Assistant OS