forked from forkanization/Proxmox-arm64
Move all upstream changes to repo
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -17,11 +17,7 @@ msg_info "Installing Dependencies"
|
|||||||
$STD apt-get install -y curl
|
$STD apt-get install -y curl
|
||||||
$STD apt-get install -y sudo
|
$STD apt-get install -y sudo
|
||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
$STD apt-get install -y make
|
|
||||||
$STD apt-get install -y g++
|
|
||||||
$STD apt-get install -y gcc
|
|
||||||
$STD apt-get install -y ca-certificates
|
$STD apt-get install -y ca-certificates
|
||||||
$STD apt-get install -y gnupg
|
|
||||||
$STD apt-get install -y wget
|
$STD apt-get install -y wget
|
||||||
$STD apt-get install -y gpg
|
$STD apt-get install -y gpg
|
||||||
$STD apt-get install -y openssh-server
|
$STD apt-get install -y openssh-server
|
||||||
@@ -50,6 +46,8 @@ rm -rf homepage-${RELEASE}
|
|||||||
cd /opt/homepage
|
cd /opt/homepage
|
||||||
cp /opt/homepage/src/skeleton/* /opt/homepage/config
|
cp /opt/homepage/src/skeleton/* /opt/homepage/config
|
||||||
$STD pnpm install
|
$STD pnpm install
|
||||||
|
export NEXT_PUBLIC_VERSION="v$RELEASE"
|
||||||
|
export NEXT_PUBLIC_REVISION="source"
|
||||||
$STD pnpm build
|
$STD pnpm build
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
msg_ok "Installed Homepage v${RELEASE}"
|
msg_ok "Installed Homepage v${RELEASE}"
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: kristocopani
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
mc \
|
||||||
|
sudo \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
|
||||||
|
msg_info "Installing InspIRCd"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/inspircd/inspircd/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
cd /opt
|
||||||
|
wget -q https://github.com/inspircd/inspircd/releases/download/v${RELEASE}/inspircd_${RELEASE}.deb12u1_amd64.deb
|
||||||
|
$STD apt-get install "./inspircd_${RELEASE}.deb12u1_amd64.deb" -y &>/dev/null
|
||||||
|
cat <<EOF >/etc/inspircd/inspircd.conf
|
||||||
|
<define name="networkDomain" value="helper-scripts.com">
|
||||||
|
<define name="networkName" value="Proxmox VE Helper-Scripts">
|
||||||
|
|
||||||
|
<server
|
||||||
|
name="irc.&networkDomain;"
|
||||||
|
description="&networkName; IRC server"
|
||||||
|
network="&networkName;">
|
||||||
|
<admin
|
||||||
|
name="Admin"
|
||||||
|
description="Supreme Overlord"
|
||||||
|
email="irc@&networkDomain;">
|
||||||
|
<bind address="" port="6667" type="clients">
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
msg_ok "Installed InspIRCd"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/inspircd_${RELEASE}.deb12u1_amd64.deb
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: kristocopani
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
mc \
|
||||||
|
sudo \
|
||||||
|
openjdk-17-jre \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setup Jenkins"
|
||||||
|
wget -qO /usr/share/keyrings/jenkins-keyring.asc https://pkg.jenkins.io/debian/jenkins.io-2023.key
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" https://pkg.jenkins.io/debian binary/ >/etc/apt/sources.list.d/jenkins.list
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get install -y jenkins
|
||||||
|
msg_ok "Setup Jenkins"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: MickLesk
|
||||||
|
# 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 \
|
||||||
|
apt-transport-https \
|
||||||
|
sudo \
|
||||||
|
mc \
|
||||||
|
curl \
|
||||||
|
apache2 \
|
||||||
|
git \
|
||||||
|
expect \
|
||||||
|
composer \
|
||||||
|
mariadb-server \
|
||||||
|
libapache2-mod-php \
|
||||||
|
php8.2-{mbstring,gd,intl,pdo,mysql,tokenizer,zip,xml} \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up database"
|
||||||
|
DB_NAME=kimai_db
|
||||||
|
DB_USER=kimai
|
||||||
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
|
MYSQL_VERSION=$(mysql --version | grep -oP 'Distrib \K[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
|
mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||||
|
mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||||
|
mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||||
|
{
|
||||||
|
echo "Kimai-Credentials"
|
||||||
|
echo "Kimai Database User: $DB_USER"
|
||||||
|
echo "Kimai Database Password: $DB_PASS"
|
||||||
|
echo "Kimai Database Name: $DB_NAME"
|
||||||
|
} >> ~/kimai.creds
|
||||||
|
msg_ok "Set up database"
|
||||||
|
|
||||||
|
msg_info "Installing Kimai (Patience)"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/kimai/kimai/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
wget -q "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip"
|
||||||
|
unzip -q ${RELEASE}.zip
|
||||||
|
mv kimai-${RELEASE} /opt/kimai
|
||||||
|
cd /opt/kimai
|
||||||
|
echo "export COMPOSER_ALLOW_SUPERUSER=1" >> ~/.bashrc
|
||||||
|
source ~/.bashrc
|
||||||
|
$STD composer install --no-dev --optimize-autoloader --no-interaction
|
||||||
|
cp .env.dist .env
|
||||||
|
sed -i "/^DATABASE_URL=/c\DATABASE_URL=mysql://$DB_USER:$DB_PASS@127.0.0.1:3306/$DB_NAME?charset=utf8mb4&serverVersion=$MYSQL_VERSION" /opt/kimai/.env
|
||||||
|
$STD bin/console kimai:install -n
|
||||||
|
chown -R :www-data /opt/*
|
||||||
|
chmod -R g+r /opt/*
|
||||||
|
chmod -R g+rw /opt/*
|
||||||
|
sudo chown -R www-data:www-data /opt/*
|
||||||
|
sudo chmod -R 755 /opt/*
|
||||||
|
$STD expect <<EOF
|
||||||
|
set timeout -1
|
||||||
|
log_user 0
|
||||||
|
|
||||||
|
spawn bin/console kimai:user:create admin admin@helper-scripts.com ROLE_SUPER_ADMIN
|
||||||
|
|
||||||
|
expect "Please enter the password:"
|
||||||
|
send "helper-scripts.com\r"
|
||||||
|
|
||||||
|
expect eof
|
||||||
|
EOF
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
msg_ok "Installed Kimai"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/apache2/sites-available/kimai.conf
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot /opt/kimai/public/
|
||||||
|
|
||||||
|
<Directory /opt/kimai/public>
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/error.log
|
||||||
|
CustomLog /var/log/apache2/access.log combined
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
|
EOF
|
||||||
|
$STD a2ensite kimai.conf
|
||||||
|
$STD a2dissite 000-default.conf
|
||||||
|
$STD systemctl reload apache2
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf ${RELEASE}.zip
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: madelyn (DysfunctionalProgramming)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
mc \
|
||||||
|
sudo \
|
||||||
|
openjdk-17-jre \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing Komga"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/gotson/komga/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
wget -q https://github.com/gotson/komga/releases/download/${RELEASE}/komga-${RELEASE}.jar
|
||||||
|
mkdir -p /opt/komga
|
||||||
|
mv -f komga-${RELEASE}.jar /opt/komga/komga.jar
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
msg_ok "Installed Komga"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/komga.service
|
||||||
|
[Unit]
|
||||||
|
Description=Komga
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/opt/komga/
|
||||||
|
ExecStart=/usr/bin/java -jar -Xmx2g komga.jar
|
||||||
|
TimeoutStopSec=20
|
||||||
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable --now -q komga
|
||||||
|
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,97 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: MickLesk
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://komo.do/
|
||||||
|
|
||||||
|
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 \
|
||||||
|
ca-certificates \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setup Docker Repository"
|
||||||
|
install -m 0755 -d /etc/apt/keyrings
|
||||||
|
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
||||||
|
chmod a+r /etc/apt/keyrings/docker.asc
|
||||||
|
echo \
|
||||||
|
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
|
||||||
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||||
|
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
$STD apt-get update
|
||||||
|
msg_ok "Setup Docker Repository"
|
||||||
|
|
||||||
|
msg_info "Installing Docker"
|
||||||
|
$STD apt-get install -y \
|
||||||
|
docker-ce \
|
||||||
|
docker-ce-cli \
|
||||||
|
containerd.io \
|
||||||
|
docker-buildx-plugin \
|
||||||
|
docker-compose-plugin
|
||||||
|
msg_ok "Installed Docker"
|
||||||
|
|
||||||
|
echo "Choose the database for Komodo installation:"
|
||||||
|
echo "1) MongoDB (recommended)"
|
||||||
|
echo "2) SQLite"
|
||||||
|
echo "3) PostgreSQL"
|
||||||
|
read -rp "Enter your choice (default: 1): " DB_CHOICE
|
||||||
|
DB_CHOICE=${DB_CHOICE:-1}
|
||||||
|
|
||||||
|
case $DB_CHOICE in
|
||||||
|
1)
|
||||||
|
DB_COMPOSE_FILE="mongo.compose.yaml"
|
||||||
|
;;
|
||||||
|
2)
|
||||||
|
DB_COMPOSE_FILE="sqlite.compose.yaml"
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
DB_COMPOSE_FILE="postgres.compose.yaml"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid choice. Defaulting to MongoDB."
|
||||||
|
DB_COMPOSE_FILE="mongo.compose.yaml"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
mkdir -p /opt/komodo
|
||||||
|
cd /opt/komodo
|
||||||
|
wget -q "https://raw.githubusercontent.com/mbecker20/komodo/main/compose/$DB_COMPOSE_FILE"
|
||||||
|
|
||||||
|
|
||||||
|
msg_info "Setup Komodo Environment"
|
||||||
|
wget -q -O /opt/komodo/compose.env https://raw.githubusercontent.com/mbecker20/komodo/main/compose/compose.env
|
||||||
|
DB_PASSWORD=$(openssl rand -base64 16 | tr -d '/+=')
|
||||||
|
PASSKEY=$(openssl rand -base64 24 | tr -d '/+=')
|
||||||
|
WEBHOOK_SECRET=$(openssl rand -base64 24 | tr -d '/+=')
|
||||||
|
JWT_SECRET=$(openssl rand -base64 24 | tr -d '/+=')
|
||||||
|
|
||||||
|
sed -i "s/^DB_USERNAME=.*/DB_USERNAME=komodo_admin/" /opt/komodo/compose.env
|
||||||
|
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=${DB_PASSWORD}/" /opt/komodo/compose.env
|
||||||
|
sed -i "s/^PASSKEY=.*/PASSKEY=${PASSKEY}/" /opt/komodo/compose.env
|
||||||
|
sed -i "s/^KOMODO_WEBHOOK_SECRET=.*/KOMODO_WEBHOOK_SECRET=${WEBHOOK_SECRET}/" /opt/komodo/compose.env
|
||||||
|
sed -i "s/^KOMODO_JWT_SECRET=.*/KOMODO_JWT_SECRET=${JWT_SECRET}/" /opt/komodo/compose.env
|
||||||
|
msg_ok "Setup Komodo Environment"
|
||||||
|
|
||||||
|
msg_info "Initialize Komodo"
|
||||||
|
$STD docker compose -p komodo -f /opt/komodo/$DB_COMPOSE_FILE --env-file /opt/komodo/compose.env up -d
|
||||||
|
msg_ok "Initialized Komodo"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -22,7 +22,7 @@ $STD apt-get install -y wget
|
|||||||
$STD apt-get install -y openssh-server
|
$STD apt-get install -y openssh-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Kubo"
|
msg_info "Installing IPFS"
|
||||||
RELEASE=$(wget -q https://github.com/ipfs/kubo/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
RELEASE=$(wget -q https://github.com/ipfs/kubo/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||||
$STD wget -q "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-arm64.tar.gz"
|
$STD wget -q "https://github.com/ipfs/kubo/releases/download/${RELEASE}/kubo_${RELEASE}_linux-arm64.tar.gz"
|
||||||
tar -xzf "kubo_${RELEASE}_linux-arm64.tar.gz" -C /usr/local
|
tar -xzf "kubo_${RELEASE}_linux-arm64.tar.gz" -C /usr/local
|
||||||
@@ -35,7 +35,7 @@ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin "[\"http://${LXCI
|
|||||||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'
|
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'
|
||||||
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
$STD rm "kubo_${RELEASE}_linux-arm64.tar.gz"
|
$STD rm "kubo_${RELEASE}_linux-arm64.tar.gz"
|
||||||
msg_ok "Installed Kubo"
|
msg_ok "Installed IPFS"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/ipfs.service
|
cat <<EOF >/etc/systemd/system/ipfs.service
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck
|
# Author: tteck
|
||||||
# Co-Author: MountyMapleSyrup (MountyMapleSyrup)
|
# Co-Author: MountyMapleSyrup (MountyMapleSyrup)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -15,17 +15,23 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y curl
|
$STD apt-get install -y \
|
||||||
$STD apt-get install -y sudo
|
curl \
|
||||||
$STD apt-get install -y mc
|
sudo \
|
||||||
$STD apt-get install -y git
|
mc \
|
||||||
$STD apt-get install -y wget
|
git \
|
||||||
$STD apt-get install -y openssh-server
|
libpng-dev \
|
||||||
|
libjpeg-dev \
|
||||||
|
libtiff-dev \
|
||||||
|
imagemagick \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Python3 Dependencies"
|
msg_info "Installing Python3 Dependencies"
|
||||||
$STD apt-get install -y pip
|
$STD apt-get install -y \
|
||||||
$STD apt-get install -y python3-irc
|
pip \
|
||||||
|
python3-irc
|
||||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||||
$STD pip install jaraco.stream
|
$STD pip install jaraco.stream
|
||||||
$STD pip install python-Levenshtein
|
$STD pip install python-Levenshtein
|
||||||
@@ -34,6 +40,8 @@ msg_ok "Installed Python3 Dependencies"
|
|||||||
|
|
||||||
msg_info "Installing LazyLibrarian"
|
msg_info "Installing LazyLibrarian"
|
||||||
$STD git clone https://gitlab.com/LazyLibrarian/LazyLibrarian /opt/LazyLibrarian
|
$STD git clone https://gitlab.com/LazyLibrarian/LazyLibrarian /opt/LazyLibrarian
|
||||||
|
cd /opt/LazyLibrarian
|
||||||
|
$STD pip install .
|
||||||
msg_ok "Installed LazyLibrarian"
|
msg_ok "Installed LazyLibrarian"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
|
# Co-Author: MickLesk (Canbiz)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -14,14 +15,16 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y curl
|
$STD apt-get install -y \
|
||||||
$STD apt-get install -y sudo
|
curl \
|
||||||
$STD apt-get install -y mc
|
sudo \
|
||||||
$STD apt-get install -y git
|
mc \
|
||||||
$STD apt-get install -y gpg
|
make \
|
||||||
$STD apt-get install -y postgresql
|
postgresql \
|
||||||
$STD apt-get install -y wget
|
cargo \
|
||||||
$STD apt-get install -y openssh-server
|
gnupg \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up Node.js Repository"
|
msg_info "Setting up Node.js Repository"
|
||||||
@@ -36,22 +39,28 @@ $STD apt-get install -y nodejs
|
|||||||
$STD npm install -g yarn
|
$STD npm install -g yarn
|
||||||
msg_ok "Installed Node.js/Yarn"
|
msg_ok "Installed Node.js/Yarn"
|
||||||
|
|
||||||
msg_info "Clone Linkwarden Repository"
|
msg_info "Installing Monolith"
|
||||||
$STD git clone https://github.com/linkwarden/linkwarden.git /opt/linkwarden
|
$STD cargo install monolith
|
||||||
cd /opt/linkwarden
|
export PATH=~/.cargo/bin:$PATH
|
||||||
msg_ok "Cloned Linkwarden Repository"
|
msg_ok "Installed Monolith"
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL DB"
|
msg_info "Setting up PostgreSQL DB"
|
||||||
DB_NAME=linkwardendb
|
DB_NAME=linkwardendb
|
||||||
DB_USER=linkwarden
|
DB_USER=linkwarden
|
||||||
DB_PASS="$(openssl rand -base64 18 | tr -d '/' | cut -c1-13)"
|
DB_PASS="$(openssl rand -base64 18 | tr -d '/' | cut -c1-13)"
|
||||||
|
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
||||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
|
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||||
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||||
echo "" >>~/linkwarden.creds
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||||
echo -e "Linkwarden Database User: \e[32m$DB_USER\e[0m" >>~/linkwarden.creds
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC';"
|
||||||
echo -e "Linkwarden Database Password: \e[32m$DB_PASS\e[0m" >>~/linkwarden.creds
|
{
|
||||||
echo -e "Linkwarden Database Name: \e[32m$DB_NAME\e[0m" >>~/linkwarden.creds
|
echo "Linkwarden-Credentials"
|
||||||
|
echo "Linkwarden Database User: $DB_USER"
|
||||||
|
echo "Linkwarden Database Password: $DB_PASS"
|
||||||
|
echo "Linkwarden Database Name: $DB_NAME"
|
||||||
|
echo "Linkwarden Secret: $SECRET_KEY"
|
||||||
|
} >> ~/linkwarden.creds
|
||||||
msg_ok "Set up PostgreSQL DB"
|
msg_ok "Set up PostgreSQL DB"
|
||||||
|
|
||||||
read -r -p "Would you like to add Adminer? <y/N> " prompt
|
read -r -p "Would you like to add Adminer? <y/N> " prompt
|
||||||
@@ -68,17 +77,28 @@ if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
|||||||
echo -e "Adminer Username: \e[32m$DB_USER\e[0m" >>~/linkwarden.creds
|
echo -e "Adminer Username: \e[32m$DB_USER\e[0m" >>~/linkwarden.creds
|
||||||
echo -e "Adminer Password: \e[32m$DB_PASS\e[0m" >>~/linkwarden.creds
|
echo -e "Adminer Password: \e[32m$DB_PASS\e[0m" >>~/linkwarden.creds
|
||||||
echo -e "Adminer Database: \e[32m$DB_NAME\e[0m" >>~/linkwarden.creds
|
echo -e "Adminer Database: \e[32m$DB_NAME\e[0m" >>~/linkwarden.creds
|
||||||
|
{
|
||||||
|
echo ""
|
||||||
|
echo "Adminer-Credentials"
|
||||||
|
echo "Adminer WebUI: $IP/adminer/"
|
||||||
|
echo "Adminer Database User: $DB_USER"
|
||||||
|
echo "Adminer Database Password: $DB_PASS"
|
||||||
|
echo "Adminer Database Name: $DB_NAME"
|
||||||
|
} >> ~/linkwarden.creds
|
||||||
msg_ok "Installed Adminer"
|
msg_ok "Installed Adminer"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg_info "Installing Linkwarden (Patience)"
|
msg_info "Installing Linkwarden (Patience)"
|
||||||
|
cd /opt
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
wget -q "https://github.com/linkwarden/linkwarden/archive/refs/tags/${RELEASE}.zip"
|
||||||
|
unzip -q ${RELEASE}.zip
|
||||||
|
mv linkwarden-${RELEASE:1} /opt/linkwarden
|
||||||
|
cd /opt/linkwarden
|
||||||
$STD yarn
|
$STD yarn
|
||||||
$STD npx playwright install-deps
|
$STD npx playwright install-deps
|
||||||
$STD yarn playwright install
|
$STD yarn playwright install
|
||||||
IP=$(hostname -I | awk '{print $1}')
|
IP=$(hostname -I | awk '{print $1}')
|
||||||
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
|
||||||
env_path="/opt/linkwarden/.env"
|
env_path="/opt/linkwarden/.env"
|
||||||
echo "
|
echo "
|
||||||
NEXTAUTH_SECRET=${SECRET_KEY}
|
NEXTAUTH_SECRET=${SECRET_KEY}
|
||||||
@@ -87,6 +107,7 @@ DATABASE_URL=postgresql://${DB_USER}:${DB_PASS}@localhost:5432/${DB_NAME}
|
|||||||
" >$env_path
|
" >$env_path
|
||||||
$STD yarn build
|
$STD yarn build
|
||||||
$STD yarn prisma migrate deploy
|
$STD yarn prisma migrate deploy
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
msg_ok "Installed Linkwarden"
|
msg_ok "Installed Linkwarden"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
@@ -97,6 +118,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=exec
|
Type=exec
|
||||||
|
Environment=PATH=$PATH
|
||||||
WorkingDirectory=/opt/linkwarden
|
WorkingDirectory=/opt/linkwarden
|
||||||
ExecStart=/usr/bin/yarn start
|
ExecStart=/usr/bin/yarn start
|
||||||
|
|
||||||
@@ -110,6 +132,7 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/${RELEASE}.zip
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|||||||
@@ -0,0 +1,82 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: bvdberg01
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
postgresql \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up PostgreSQL"
|
||||||
|
DB_NAME=listmonk
|
||||||
|
DB_USER=listmonk
|
||||||
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||||
|
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||||
|
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
|
||||||
|
{
|
||||||
|
echo "listmonk-Credentials"
|
||||||
|
echo -e "listmonk Database User: \e[32m$DB_USER\e[0m"
|
||||||
|
echo -e "listmonk Database Password: \e[32m$DB_PASS\e[0m"
|
||||||
|
echo -e "listmonk Database Name: \e[32m$DB_NAME\e[0m"
|
||||||
|
} >> ~/listmonk.creds
|
||||||
|
msg_ok "Set up PostgreSQL"
|
||||||
|
|
||||||
|
msg_info "Installing listmonk"
|
||||||
|
cd /opt
|
||||||
|
mkdir /opt/listmonk
|
||||||
|
mkdir /opt/listmonk/uploads
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/knadh/listmonk/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
wget -q "https://github.com/knadh/listmonk/releases/download/v${RELEASE}/listmonk_${RELEASE}_linux_arm64.tar.gz"
|
||||||
|
tar -xzf "listmonk_${RELEASE}_linux_arm64.tar.gz" -C /opt/listmonk
|
||||||
|
|
||||||
|
$STD /opt/listmonk/listmonk --new-config --config /opt/listmonk/config.toml
|
||||||
|
sed -i -e 's/address = "localhost:9000"/address = "0.0.0.0:9000"/' -e 's/^password = ".*"/password = "'"$DB_PASS"'"/' /opt/listmonk/config.toml
|
||||||
|
$STD /opt/listmonk/listmonk --install --yes --config /opt/listmonk/config.toml
|
||||||
|
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
msg_ok "Installed listmonk"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/listmonk.service
|
||||||
|
[Unit]
|
||||||
|
Description=Listmonk Service
|
||||||
|
Wants=network.target
|
||||||
|
After=postgresql.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/opt/listmonk/listmonk --config /opt/listmonk/config.toml
|
||||||
|
Restart=always
|
||||||
|
RestartSec=3
|
||||||
|
WorkingDirectory=/opt/listmonk
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now listmonk
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf "/opt/listmonk_${RELEASE}_linux_arm64.tar.gz"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: kristocopani
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
wget \
|
||||||
|
mc \
|
||||||
|
zip \
|
||||||
|
jq \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
|
||||||
|
msg_info "Installing LubeLogger"
|
||||||
|
cd /opt
|
||||||
|
mkdir -p /opt/lubelogger
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/hargata/lubelog/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
RELEASE_TRIMMED=$(echo "${RELEASE}" | tr -d ".")
|
||||||
|
cd /opt/lubelogger
|
||||||
|
wget -q https://github.com/hargata/lubelog/releases/download/v${RELEASE}/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip
|
||||||
|
unzip -q LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip
|
||||||
|
chmod 700 /opt/lubelogger/CarCareTracker
|
||||||
|
cp /opt/lubelogger/appsettings.json /opt/lubelogger/appsettings_bak.json
|
||||||
|
jq '.Kestrel = {"Endpoints": {"Http": {"Url": "http://0.0.0.0:5000"}}}' /opt/lubelogger/appsettings_bak.json > /opt/lubelogger/appsettings.json
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
msg_ok "Installed LubeLogger"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/lubelogger.service
|
||||||
|
[Unit]
|
||||||
|
Description=LubeLogger Daemon
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
|
||||||
|
Type=simple
|
||||||
|
WorkingDirectory=/opt/lubelogger
|
||||||
|
ExecStart=/opt/lubelogger/CarCareTracker
|
||||||
|
TimeoutStopSec=20
|
||||||
|
KillMode=process
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl enable --now -q lubelogger.service
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/lubelogger/appsettings_bak.json
|
||||||
|
rm -rf /opt/lubelogger/LubeLogger_v${RELEASE_TRIMMED}_linux_x64.zip
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -29,14 +29,22 @@ $STD apt-get install -y wget
|
|||||||
$STD apt-get install -y openssh-server
|
$STD apt-get install -y openssh-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing MongoDB"
|
# Abfrage für die MongoDB-Version
|
||||||
wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg
|
read -p "Do you want to install MongoDB 8.0 instead of 7.0? [y/N]: " install_mongodb_8
|
||||||
echo "deb [ arch=arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/7.0 multiverse"
|
if [[ "$install_mongodb_8" =~ ^[Yy]$ ]]; then
|
||||||
|
MONGODB_VERSION="8.0"
|
||||||
|
else
|
||||||
|
MONGODB_VERSION="7.0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Installing MongoDB $MONGODB_VERSION"
|
||||||
|
wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB_VERSION}.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/${MONGODB_VERSION} main" >/etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}.list
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y mongodb-org
|
$STD apt-get install -y mongodb-org
|
||||||
sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf
|
sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf
|
||||||
systemctl enable -q --now mongod.service
|
systemctl enable -q --now mongod.service
|
||||||
msg_ok "Installed MongoDB"
|
msg_ok "Installed MongoDB $MONGODB_VERSION"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -23,6 +23,11 @@ $STD apt-get install -y openssh-server
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Mosquitto MQTT Broker"
|
msg_info "Installing Mosquitto MQTT Broker"
|
||||||
|
source /etc/os-release
|
||||||
|
curl -fsSL http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/usr/share/keyrings/mosquitto-repo.gpg.key
|
||||||
|
chmod go+r /usr/share/keyrings/mosquitto-repo.gpg.key
|
||||||
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mosquitto-repo.gpg.key] http://repo.mosquitto.org/debian ${VERSION_CODENAME} main" >/etc/apt/sources.list.d/mosquitto.list
|
||||||
|
$STD apt-get update
|
||||||
$STD apt-get -y install mosquitto
|
$STD apt-get -y install mosquitto
|
||||||
$STD apt-get -y install mosquitto-clients
|
$STD apt-get -y install mosquitto-clients
|
||||||
cat <<EOF >/etc/mosquitto/conf.d/default.conf
|
cat <<EOF >/etc/mosquitto/conf.d/default.conf
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: davalanche
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/mylar3/mylar3
|
||||||
|
|
||||||
|
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 \
|
||||||
|
jq \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
echo "deb http://deb.debian.org/debian bookworm non-free non-free-firmware" > /etc/apt/sources.list.d/non-free.list
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get install -y unrar
|
||||||
|
rm /etc/apt/sources.list.d/non-free.list
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Updating Python3"
|
||||||
|
$STD apt-get install -y python3-pip
|
||||||
|
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||||
|
$STD pip install -U --no-cache-dir pip
|
||||||
|
msg_ok "Updated Python3"
|
||||||
|
|
||||||
|
msg_info "Installing ${APPLICATION}"
|
||||||
|
mkdir -p /opt/mylar3
|
||||||
|
mkdir -p /opt/mylar3-data
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/mylar3/mylar3/releases/latest | jq -r '.tag_name')
|
||||||
|
wget -qO- https://github.com/mylar3/mylar3/archive/refs/tags/${RELEASE}.tar.gz | tar -xz --strip-components=1 -C /opt/mylar3
|
||||||
|
$STD pip install --no-cache-dir -r /opt/mylar3/requirements.txt
|
||||||
|
echo "${RELEASE}" > /opt/${APPLICATION}_version.txt
|
||||||
|
msg_ok "Installed ${APPLICATION}"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/mylar3.service
|
||||||
|
[Unit]
|
||||||
|
Description=Mylar3 Service
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/python3 /opt/mylar3/Mylar.py --daemon --nolaunch --datadir=/opt/mylar3-data
|
||||||
|
GuessMainPID=no
|
||||||
|
Type=forking
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable -q --now mylar3.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,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck
|
# Author: tteck
|
||||||
# Co-Author: MickLesk (Canbiz)
|
# Co-Author: MickLesk (Canbiz)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://www.mysql.com/products/community | https://www.phpmyadmin.net
|
# Source: https://www.mysql.com/products/community | https://www.phpmyadmin.net
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
@@ -26,9 +26,17 @@ $STD apt-get install -y \
|
|||||||
openssh-server
|
openssh-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
RELEASE_REPO="mysql-8.0"
|
||||||
|
RELEASE_AUTH="mysql_native_password"
|
||||||
|
read -r -p "Would you like to install the MySQL 8.4 LTS release instead of MySQL 8.0 (bug fix track; EOL April-2026)? <y/N> " prompt
|
||||||
|
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||||
|
RELEASE_REPO="mysql-8.4-lts"
|
||||||
|
RELEASE_AUTH="caching_sha2_password"
|
||||||
|
fi
|
||||||
|
|
||||||
msg_info "Installing MySQL"
|
msg_info "Installing MySQL"
|
||||||
curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 | gpg --dearmor -o /usr/share/keyrings/mysql.gpg
|
curl -fsSL https://repo.mysql.com/RPM-GPG-KEY-mysql-2023 | gpg --dearmor -o /usr/share/keyrings/mysql.gpg
|
||||||
echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/debian $(lsb_release -sc) mysql-8.0" >/etc/apt/sources.list.d/mysql.list
|
echo "deb [signed-by=/usr/share/keyrings/mysql.gpg] http://repo.mysql.com/apt/debian $(lsb_release -sc) ${RELEASE_REPO}" >/etc/apt/sources.list.d/mysql.list
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
@@ -38,7 +46,7 @@ msg_ok "Installed MySQL"
|
|||||||
|
|
||||||
msg_info "Configure MySQL Server"
|
msg_info "Configure MySQL Server"
|
||||||
ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
ADMIN_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
||||||
$STD mysql -uroot -p"$ADMIN_PASS" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '$ADMIN_PASS'; FLUSH PRIVILEGES;"
|
$STD mysql -uroot -p"$ADMIN_PASS" -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH $RELEASE_AUTH BY '$ADMIN_PASS'; FLUSH PRIVILEGES;"
|
||||||
echo "" >~/mysql.creds
|
echo "" >~/mysql.creds
|
||||||
echo -e "MySQL user: root" >>~/mysql.creds
|
echo -e "MySQL user: root" >>~/mysql.creds
|
||||||
echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds
|
echo -e "MySQL password: $ADMIN_PASS" >>~/mysql.creds
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ install -d -o root -g root /var/lib/navidrome
|
|||||||
wget -q https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_linux_arm64.tar.gz -O Navidrome.tar.gz
|
wget -q https://github.com/navidrome/navidrome/releases/download/v${RELEASE}/navidrome_${RELEASE}_linux_arm64.tar.gz -O Navidrome.tar.gz
|
||||||
$STD tar -xvzf Navidrome.tar.gz -C /opt/navidrome/
|
$STD tar -xvzf Navidrome.tar.gz -C /opt/navidrome/
|
||||||
chown -R root:root /opt/navidrome
|
chown -R root:root /opt/navidrome
|
||||||
|
chmod +x /opt/navidrome/navidrome
|
||||||
mkdir -p /music
|
mkdir -p /music
|
||||||
cat <<EOF >/var/lib/navidrome/navidrome.toml
|
cat <<EOF >/var/lib/navidrome/navidrome.toml
|
||||||
MusicFolder = '/music'
|
MusicFolder = '/music'
|
||||||
|
|||||||
@@ -0,0 +1,121 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: bvdberg01
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
apache2 \
|
||||||
|
redis-server \
|
||||||
|
postgresql \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv \
|
||||||
|
python3-dev \
|
||||||
|
build-essential \
|
||||||
|
libxml2-dev \
|
||||||
|
libxslt1-dev \
|
||||||
|
libffi-dev \
|
||||||
|
libpq-dev \
|
||||||
|
libssl-dev \
|
||||||
|
zlib1g-dev \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up PostgreSQL"
|
||||||
|
DB_NAME=netbox
|
||||||
|
DB_USER=netbox
|
||||||
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||||
|
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||||
|
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
|
||||||
|
{
|
||||||
|
echo "Netbox-Credentials"
|
||||||
|
echo -e "Netbox Database User: \e[32m$DB_USER\e[0m"
|
||||||
|
echo -e "Netbox Database Password: \e[32m$DB_PASS\e[0m"
|
||||||
|
echo -e "Netbox Database Name: \e[32m$DB_NAME\e[0m"
|
||||||
|
} >> ~/netbox.creds
|
||||||
|
msg_ok "Set up PostgreSQL"
|
||||||
|
|
||||||
|
msg_info "Installing NetBox (Patience)"
|
||||||
|
cd /opt
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/netbox-community/netbox/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
wget -q "https://github.com/netbox-community/netbox/archive/refs/tags/v${RELEASE}.zip"
|
||||||
|
unzip -q "v${RELEASE}.zip"
|
||||||
|
mv /opt/netbox-${RELEASE}/ /opt/netbox
|
||||||
|
|
||||||
|
$STD adduser --system --group netbox
|
||||||
|
chown --recursive netbox /opt/netbox/netbox/media/
|
||||||
|
chown --recursive netbox /opt/netbox/netbox/reports/
|
||||||
|
chown --recursive netbox /opt/netbox/netbox/scripts/
|
||||||
|
|
||||||
|
mv /opt/netbox/netbox/netbox/configuration_example.py /opt/netbox/netbox/netbox/configuration.py
|
||||||
|
|
||||||
|
SECRET_KEY=$(python3 /opt/netbox/netbox/generate_secret_key.py)
|
||||||
|
ESCAPED_SECRET_KEY=$(printf '%s\n' "$SECRET_KEY" | sed 's/[&/\]/\\&/g')
|
||||||
|
|
||||||
|
sed -i 's/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = ["*"]/' /opt/netbox/netbox/netbox/configuration.py
|
||||||
|
sed -i "s|SECRET_KEY = ''|SECRET_KEY = '${ESCAPED_SECRET_KEY}'|" /opt/netbox/netbox/netbox/configuration.py
|
||||||
|
sed -i "/DATABASE = {/,/}/s/'USER': '[^']*'/'USER': '$DB_USER'/" /opt/netbox/netbox/netbox/configuration.py
|
||||||
|
sed -i "/DATABASE = {/,/}/s/'PASSWORD': '[^']*'/'PASSWORD': '$DB_PASS'/" /opt/netbox/netbox/netbox/configuration.py
|
||||||
|
|
||||||
|
$STD /opt/netbox/upgrade.sh
|
||||||
|
ln -s /opt/netbox/contrib/netbox-housekeeping.sh /etc/cron.daily/netbox-housekeeping
|
||||||
|
|
||||||
|
mv /opt/netbox/contrib/apache.conf /etc/apache2/sites-available/netbox.conf
|
||||||
|
$STD openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/netbox.key -out /etc/ssl/certs/netbox.crt -subj "/C=US/O=NetBox/OU=Certificate/CN=localhost"
|
||||||
|
$STD a2enmod ssl proxy proxy_http headers rewrite
|
||||||
|
$STD a2ensite netbox
|
||||||
|
systemctl restart apache2
|
||||||
|
|
||||||
|
mv /opt/netbox/contrib/gunicorn.py /opt/netbox/gunicorn.py
|
||||||
|
mv /opt/netbox/contrib/*.service /etc/systemd/system/
|
||||||
|
systemctl daemon-reload
|
||||||
|
systemctl enable -q --now netbox netbox-rq
|
||||||
|
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
echo -e "Netbox Secret: \e[32m$SECRET_KEY\e[0m" >> ~/netbox.creds
|
||||||
|
msg_ok "Installed NetBox"
|
||||||
|
|
||||||
|
msg_info "Setting up Django Admin"
|
||||||
|
DJANGO_USER=Admin
|
||||||
|
DJANGO_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||||
|
|
||||||
|
source /opt/netbox/venv/bin/activate
|
||||||
|
$STD python3 /opt/netbox/netbox/manage.py shell << EOF
|
||||||
|
from django.contrib.auth import get_user_model
|
||||||
|
UserModel = get_user_model()
|
||||||
|
user = UserModel.objects.create_user('$DJANGO_USER', password='$DJANGO_PASS')
|
||||||
|
user.is_superuser = True
|
||||||
|
user.is_staff = True
|
||||||
|
user.save()
|
||||||
|
EOF
|
||||||
|
{
|
||||||
|
echo ""
|
||||||
|
echo "Netbox-Django-Credentials"
|
||||||
|
echo -e "Django User: \e[32m$DJANGO_USER\e[0m"
|
||||||
|
echo -e "Django Password: \e[32m$DJANGO_PASS\e[0m"
|
||||||
|
} >> ~/netbox.creds
|
||||||
|
msg_ok "Setup Django Admin"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm "/opt/v${RELEASE}.zip"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -22,17 +22,7 @@ $STD apt-get install -y openssh-server
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing NextCloudPi (Patience)"
|
msg_info "Installing NextCloudPi (Patience)"
|
||||||
$STD apt-get install -y systemd-resolved
|
|
||||||
systemctl enable -q --now systemd-resolved
|
|
||||||
cat <<'EOF' >/etc/systemd/resolved.conf
|
|
||||||
[Resolve]
|
|
||||||
DNS=8.8.8.8
|
|
||||||
FallbackDNS=8.8.4.4
|
|
||||||
EOF
|
|
||||||
systemctl restart systemd-resolved
|
|
||||||
$STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh)
|
$STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh)
|
||||||
systemctl disable -q --now systemd-resolved
|
|
||||||
$STD apt-get remove -y systemd-resolved
|
|
||||||
msg_ok "Installed NextCloudPi"
|
msg_ok "Installed NextCloudPi"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 communtiy-scripts ORG
|
||||||
|
# Author: MickLesk (Canbiz)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 (Patience)"
|
||||||
|
$STD apt-get install -y \
|
||||||
|
mediainfo \
|
||||||
|
libmediainfo-dev \
|
||||||
|
libc6 \
|
||||||
|
curl \
|
||||||
|
sudo \
|
||||||
|
libgdiplus \
|
||||||
|
acl \
|
||||||
|
dvb-tools \
|
||||||
|
libdvbv5-0 \
|
||||||
|
dtv-scan-tables \
|
||||||
|
libc6-dev \
|
||||||
|
ffmpeg \
|
||||||
|
mc \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setup NextPVR (Patience)"
|
||||||
|
cd /opt
|
||||||
|
wget -q https://nextpvr.com/nextpvr-helper.deb
|
||||||
|
$STD dpkg -i nextpvr-helper.deb
|
||||||
|
msg_ok "Installed NextPVR"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/nextpvr-helper.deb
|
||||||
|
$STD apt-get autoremove
|
||||||
|
$STD apt-get autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck
|
# Author: tteck
|
||||||
# Co-Author: havardthom
|
# Co-Author: havardthom
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -20,6 +20,8 @@ $STD apt-get install -y sudo
|
|||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
$STD apt-get install -y gpg
|
$STD apt-get install -y gpg
|
||||||
$STD apt-get install -y par2
|
$STD apt-get install -y par2
|
||||||
|
$STD apt-get install -y wget
|
||||||
|
$STD apt-get install -y openssh-server
|
||||||
cat <<EOF >/etc/apt/sources.list.d/non-free.list
|
cat <<EOF >/etc/apt/sources.list.d/non-free.list
|
||||||
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck
|
# Author: tteck
|
||||||
# Co-Author: havardthom
|
# Co-Author: havardthom
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -26,10 +26,10 @@ $STD apt-get install -y cmake
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Golang"
|
msg_info "Installing Golang"
|
||||||
$STD wget https://golang.org/dl/go1.23.2.linux-amd64.tar.gz
|
$STD wget https://golang.org/dl/go1.23.2.linux-arm64.tar.gz
|
||||||
$STD tar -xzf go1.23.2.linux-amd64.tar.gz -C /usr/local
|
$STD tar -xzf go1.23.2.linux-arm64.tar.gz -C /usr/local
|
||||||
$STD ln -s /usr/local/go/bin/go /usr/local/bin/go
|
$STD ln -s /usr/local/go/bin/go /usr/local/bin/go
|
||||||
rm -rf go1.23.2.linux-amd64.tar.gz
|
rm -rf go1.23.2.linux-arm64.tar.gz
|
||||||
msg_ok "Installed Golang"
|
msg_ok "Installed Golang"
|
||||||
|
|
||||||
msg_info "Setting up Intel® Repositories"
|
msg_info "Setting up Intel® Repositories"
|
||||||
@@ -42,7 +42,7 @@ $STD apt-get update
|
|||||||
msg_ok "Set up Intel® Repositories"
|
msg_ok "Set up Intel® Repositories"
|
||||||
|
|
||||||
msg_info "Setting Up Hardware Acceleration"
|
msg_info "Setting Up Hardware Acceleration"
|
||||||
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,intel-opencl-icd,vainfo,intel-gpu-tools,intel-level-zero-gpu,level-zero,level-zero-dev}
|
$STD apt-get -y install {va-driver-all,ocl-icd-libopencl1,vainfo,level-zero,level-zero-dev}
|
||||||
if [[ "$CTTYPE" == "0" ]]; then
|
if [[ "$CTTYPE" == "0" ]]; then
|
||||||
chgrp video /dev/dri
|
chgrp video /dev/dri
|
||||||
chmod 755 /dev/dri
|
chmod 755 /dev/dri
|
||||||
@@ -52,10 +52,6 @@ if [[ "$CTTYPE" == "0" ]]; then
|
|||||||
fi
|
fi
|
||||||
msg_ok "Set Up Hardware Acceleration"
|
msg_ok "Set Up Hardware Acceleration"
|
||||||
|
|
||||||
msg_info "Installing Intel® oneAPI Base Toolkit (Patience)"
|
|
||||||
$STD apt-get install -y --no-install-recommends intel-basekit-2024.1
|
|
||||||
msg_ok "Installed Intel® oneAPI Base Toolkit"
|
|
||||||
|
|
||||||
msg_info "Installing Ollama (Patience)"
|
msg_info "Installing Ollama (Patience)"
|
||||||
$STD git clone https://github.com/ollama/ollama.git /opt/ollama
|
$STD git clone https://github.com/ollama/ollama.git /opt/ollama
|
||||||
cd /opt/ollama
|
cd /opt/ollama
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: kristocopani
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
mc \
|
||||||
|
sudo \
|
||||||
|
default-jdk \
|
||||||
|
git \
|
||||||
|
git-lfs \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
|
||||||
|
msg_info "Installing OneDev"
|
||||||
|
cd /opt
|
||||||
|
wget -q https://code.onedev.io/onedev/server/~site/onedev-latest.tar.gz
|
||||||
|
tar -xzf onedev-latest.tar.gz
|
||||||
|
mv /opt/onedev-latest /opt/onedev
|
||||||
|
$STD /opt/onedev/bin/server.sh install
|
||||||
|
systemctl start onedev
|
||||||
|
RELEASE=$(cat /opt/onedev/release.properties | grep "version" | cut -d'=' -f2)
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
msg_ok "Installed OneDev"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/onedev-latest.tar.gz
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck
|
# Author: tteck
|
||||||
# Co-Author: havardthom
|
# Co-Author: havardthom
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -20,12 +20,15 @@ $STD apt-get install -y sudo
|
|||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
$STD apt-get install -y gpg
|
$STD apt-get install -y gpg
|
||||||
$STD apt-get install -y git
|
$STD apt-get install -y git
|
||||||
|
$STD apt-get install -y wget
|
||||||
|
$STD apt-get install -y openssh-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Python3 Dependencies"
|
msg_info "Installing Python3 Dependencies"
|
||||||
$STD apt-get install -y --no-install-recommends \
|
$STD apt-get install -y --no-install-recommends \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip
|
python3-pip
|
||||||
|
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||||
msg_ok "Installed Python3 Dependencies"
|
msg_ok "Installed Python3 Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up Node.js Repository"
|
msg_info "Setting up Node.js Repository"
|
||||||
|
|||||||
@@ -0,0 +1,114 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: bvdberg01
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
zip \
|
||||||
|
ca-certificates \
|
||||||
|
software-properties-common \
|
||||||
|
apt-transport-https \
|
||||||
|
lsb-release \
|
||||||
|
php-{opcache,curl,gd,mbstring,xml,bcmath,intl,zip,xsl,pgsql} \
|
||||||
|
libapache2-mod-php \
|
||||||
|
composer \
|
||||||
|
postgresql \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up PostgreSQL"
|
||||||
|
DB_NAME=partdb
|
||||||
|
DB_USER=partdb
|
||||||
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-13)
|
||||||
|
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||||
|
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER TEMPLATE template0;"
|
||||||
|
{
|
||||||
|
echo "Part-DB Credentials"
|
||||||
|
echo "Part-DB Database User: $DB_USER"
|
||||||
|
echo "Part-DB Database Password: $DB_PASS"
|
||||||
|
echo "Part-DB Database Name: $DB_NAME"
|
||||||
|
} >> ~/partdb.creds
|
||||||
|
msg_ok "Set up PostgreSQL"
|
||||||
|
|
||||||
|
msg_info "Setting up Node.js/Yarn"
|
||||||
|
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
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get install -y nodejs
|
||||||
|
$STD npm install -g npm@latest
|
||||||
|
$STD npm install -g yarn
|
||||||
|
msg_ok "Installed Node.js/Yarn"
|
||||||
|
|
||||||
|
msg_info "Installing Part-DB (Patience)"
|
||||||
|
cd /opt
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/Part-DB/Part-DB-server/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
wget -q "https://github.com/Part-DB/Part-DB-server/archive/refs/tags/v${RELEASE}.zip"
|
||||||
|
unzip -q "v${RELEASE}.zip"
|
||||||
|
mv /opt/Part-DB-server-${RELEASE}/ /opt/partdb
|
||||||
|
|
||||||
|
cd /opt/partdb/
|
||||||
|
cp .env .env.local
|
||||||
|
sed -i "s|DATABASE_URL=\"sqlite:///%kernel.project_dir%/var/app.db\"|DATABASE_URL=\"postgresql://${DB_USER}:${DB_PASS}@127.0.0.1:5432/${DB_NAME}?serverVersion=12.19&charset=utf8\"|" .env.local
|
||||||
|
|
||||||
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
|
$STD composer install --no-dev -o --no-interaction
|
||||||
|
$STD yarn install
|
||||||
|
$STD yarn build
|
||||||
|
$STD php bin/console cache:clear
|
||||||
|
php bin/console doctrine:migrations:migrate -n > ~/database-migration-output
|
||||||
|
chown -R www-data:www-data /opt/partdb
|
||||||
|
ADMIN_PASS=$(grep -oP 'The initial password for the "admin" user is: \K\w+' ~/database-migration-output)
|
||||||
|
{
|
||||||
|
echo ""
|
||||||
|
echo "Part-DB Admin User: admin"
|
||||||
|
echo "Part-DB Admin Password: $ADMIN_PASS"
|
||||||
|
} >> ~/partdb.creds
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
msg_ok "Installed Part-DB"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/apache2/sites-available/partdb.conf
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerName partdb
|
||||||
|
DocumentRoot /opt/partdb/public
|
||||||
|
<Directory /opt/partdb/public>
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/partdb_error.log
|
||||||
|
CustomLog /var/log/apache2/partdb_access.log combined
|
||||||
|
</VirtualHost>
|
||||||
|
EOF
|
||||||
|
$STD a2ensite partdb
|
||||||
|
$STD a2enmod rewrite
|
||||||
|
$STD a2dissite 000-default.conf
|
||||||
|
$STD systemctl reload apache2
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf ~/database-migration-output
|
||||||
|
rm -rf "/opt/v${RELEASE}.zip"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: TheRealVira
|
||||||
|
# License: MIT
|
||||||
|
# Source: https://pf2etools.com/
|
||||||
|
|
||||||
|
# Import Functions und Setup
|
||||||
|
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 \
|
||||||
|
mc \
|
||||||
|
sudo \
|
||||||
|
apache2 \
|
||||||
|
gpg \
|
||||||
|
ca-certificates \
|
||||||
|
git \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
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"
|
||||||
|
|
||||||
|
# Setup App
|
||||||
|
msg_info "Setup Pf2eTools"
|
||||||
|
cd /opt
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/Pf2eToolsOrg/Pf2eTools/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
wget -q "https://github.com/Pf2eToolsOrg/Pf2eTools/archive/refs/tags/${RELEASE}.zip"
|
||||||
|
unzip -q "${RELEASE}.zip"
|
||||||
|
mv "Pf2eTools-${RELEASE:1}" /opt/Pf2eTools
|
||||||
|
cd /opt/Pf2eTools
|
||||||
|
$STD npm install
|
||||||
|
$STD npm run build
|
||||||
|
cd ~
|
||||||
|
echo "${RELEASE}" >/opt/Pf2eTools_version.txt
|
||||||
|
msg_ok "Set up Pf2eTools"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >> /etc/apache2/apache2.conf
|
||||||
|
<Location /server-status>
|
||||||
|
SetHandler server-status
|
||||||
|
Order deny,allow
|
||||||
|
Allow from all
|
||||||
|
</Location>
|
||||||
|
EOF
|
||||||
|
rm -rf /var/www/html
|
||||||
|
ln -s "/opt/Pf2eTools" /var/www/html
|
||||||
|
chown -R www-data: "/opt/Pf2eTools"
|
||||||
|
chmod -R 755 "/opt/Pf2eTools"
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/${RELEASE}.zip
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -82,8 +82,6 @@ done
|
|||||||
sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf
|
sed -i 's#PIALERT_PATH\s*=\s*'\''/home/pi/pialert'\''#PIALERT_PATH = '\''/opt/pialert'\''#' /opt/pialert/config/pialert.conf
|
||||||
sed -i 's/$HOME/\/opt/g' /opt/pialert/install/pialert.cron
|
sed -i 's/$HOME/\/opt/g' /opt/pialert/install/pialert.cron
|
||||||
crontab /opt/pialert/install/pialert.cron
|
crontab /opt/pialert/install/pialert.cron
|
||||||
echo "bash -c \"\$(wget -qLO - https://github.com/leiweibau/Pi.Alert/raw/main/install/pialert_update.sh)\" -s --lxc" >/usr/bin/update
|
|
||||||
chmod +x /usr/bin/update
|
|
||||||
echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan
|
echo "python3 /opt/pialert/back/pialert.py 1" >/usr/bin/scan
|
||||||
chmod +x /usr/bin/scan
|
chmod +x /usr/bin/scan
|
||||||
echo "/opt/pialert/back/pialert-cli set_permissions --lxc" >/usr/bin/permissions
|
echo "/opt/pialert/back/pialert-cli set_permissions --lxc" >/usr/bin/permissions
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -46,6 +46,7 @@ msg_ok "Installed Pi-hole"
|
|||||||
|
|
||||||
read -r -p "Would you like to add Unbound? <y/N> " prompt
|
read -r -p "Would you like to add Unbound? <y/N> " prompt
|
||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
|
read -r -p "Unbound is configured as a recursive DNS server by default, would you like it to be configured as a forwarding DNS server (using DNS-over-TLS (DoT)) instead? <y/N> " prompt
|
||||||
msg_info "Installing Unbound"
|
msg_info "Installing Unbound"
|
||||||
$STD apt-get install -y unbound
|
$STD apt-get install -y unbound
|
||||||
cat <<EOF >/etc/unbound/unbound.conf.d/pi-hole.conf
|
cat <<EOF >/etc/unbound/unbound.conf.d/pi-hole.conf
|
||||||
@@ -75,7 +76,6 @@ server:
|
|||||||
infra-cache-slabs: 8
|
infra-cache-slabs: 8
|
||||||
key-cache-slabs: 8
|
key-cache-slabs: 8
|
||||||
serve-expired: yes
|
serve-expired: yes
|
||||||
root-hints: /var/lib/unbound/root.hints
|
|
||||||
serve-expired-ttl: 3600
|
serve-expired-ttl: 3600
|
||||||
edns-buffer-size: 1232
|
edns-buffer-size: 1232
|
||||||
prefetch: yes
|
prefetch: yes
|
||||||
@@ -96,8 +96,34 @@ EOF
|
|||||||
cat <<EOF >/etc/dnsmasq.d/99-edns.conf
|
cat <<EOF >/etc/dnsmasq.d/99-edns.conf
|
||||||
edns-packet-max=1232
|
edns-packet-max=1232
|
||||||
EOF
|
EOF
|
||||||
wget -qO /var/lib/unbound/root.hints https://www.internic.net/domain/named.root
|
|
||||||
sed -i -e 's/PIHOLE_DNS_1=8.8.8.8/PIHOLE_DNS_1=127.0.0.1#5335/' -e 's/PIHOLE_DNS_2=8.8.4.4/#PIHOLE_DNS_2=8.8.4.4/' /etc/pihole/setupVars.conf
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
|
cat <<EOF >>/etc/unbound/unbound.conf.d/pi-hole.conf
|
||||||
|
tls-cert-bundle: "/etc/ssl/certs/ca-certificates.crt"
|
||||||
|
forward-zone:
|
||||||
|
name: "."
|
||||||
|
forward-tls-upstream: yes
|
||||||
|
forward-first: no
|
||||||
|
|
||||||
|
forward-addr: 8.8.8.8@853#dns.google
|
||||||
|
forward-addr: 8.8.4.4@853#dns.google
|
||||||
|
forward-addr: 2001:4860:4860::8888@853#dns.google
|
||||||
|
forward-addr: 2001:4860:4860::8844@853#dns.google
|
||||||
|
|
||||||
|
#forward-addr: 1.1.1.1@853#cloudflare-dns.com
|
||||||
|
#forward-addr: 1.0.0.1@853#cloudflare-dns.com
|
||||||
|
#forward-addr: 2606:4700:4700::1111@853#cloudflare-dns.com
|
||||||
|
#forward-addr: 2606:4700:4700::1001@853#cloudflare-dns.com
|
||||||
|
|
||||||
|
#forward-addr: 9.9.9.9@853#dns.quad9.net
|
||||||
|
#forward-addr: 149.112.112.112@853#dns.quad9.net
|
||||||
|
#forward-addr: 2620:fe::fe@853#dns.quad9.net
|
||||||
|
#forward-addr: 2620:fe::9@853#dns.quad9.net
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i -e 's/PIHOLE_DNS_1=8.8.8.8/PIHOLE_DNS_1=127.0.0.1#5335/' -e '/PIHOLE_DNS_2=8.8.4.4/d' /etc/pihole/setupVars.conf
|
||||||
|
sed -i -e 's/server=8.8.8.8/server=127.0.0.1#5335/' -e '/server=8.8.4.4/d' /etc/dnsmasq.d/01-pihole.conf
|
||||||
systemctl enable -q --now unbound
|
systemctl enable -q --now unbound
|
||||||
systemctl restart pihole-FTL.service
|
systemctl restart pihole-FTL.service
|
||||||
msg_ok "Installed Unbound"
|
msg_ok "Installed Unbound"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -37,7 +37,7 @@ cat <<EOF >/etc/postgresql/17/main/pg_hba.conf
|
|||||||
local all postgres peer
|
local all postgres peer
|
||||||
# TYPE DATABASE USER ADDRESS METHOD
|
# TYPE DATABASE USER ADDRESS METHOD
|
||||||
# "local" is for Unix domain socket connections only
|
# "local" is for Unix domain socket connections only
|
||||||
local all all peer
|
local all all md5
|
||||||
# IPv4 local connections:
|
# IPv4 local connections:
|
||||||
host all all 127.0.0.1/32 scram-sha-256
|
host all all 127.0.0.1/32 scram-sha-256
|
||||||
host all all 0.0.0.0/24 md5
|
host all all 0.0.0.0/24 md5
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: CrazyWolf13
|
||||||
|
# License: MIT
|
||||||
|
# Source: Proxmox Server Solution GmbH
|
||||||
|
|
||||||
|
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 \
|
||||||
|
gpg \
|
||||||
|
mc \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing Proxmox Datacenter Manager"
|
||||||
|
curl -fsSL https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg | gpg --dearmor -o /etc/apt/keyrings/proxmox-release-bookworm.gpg
|
||||||
|
echo "deb [signed-by=/etc/apt/keyrings/proxmox-release-bookworm.gpg] http://download.proxmox.com/debian/pdm bookworm pdm-test " >/etc/apt/sources.list.d/proxmox-release-bookworm.list
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get install -y \
|
||||||
|
proxmox-datacenter-manager \
|
||||||
|
proxmox-datacenter-manager-ui
|
||||||
|
msg_ok "Installed Proxmox Datacenter Manager"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -39,7 +39,7 @@ cat <<EOF >/etc/systemd/system/qbittorrent-nox.service
|
|||||||
Description=qBittorrent client
|
Description=qBittorrent client
|
||||||
After=network.target
|
After=network.target
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/usr/bin/qbittorrent-nox --webui-port=8090
|
ExecStart=/usr/bin/qbittorrent-nox
|
||||||
Restart=always
|
Restart=always
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: MrYadro
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 git
|
||||||
|
$STD apt-get install -y sudo
|
||||||
|
$STD apt-get install -y mc
|
||||||
|
$STD apt-get install -y wget
|
||||||
|
$STD apt-get install -y openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing Recyclarr"
|
||||||
|
wget -q $(curl -s https://api.github.com/repos/recyclarr/recyclarr/releases/latest | grep download | grep linux-arm64 | cut -d\" -f4)
|
||||||
|
tar -C /usr/local/bin -xJf recyclarr*.tar.xz
|
||||||
|
mkdir -p /root/.config/recyclarr
|
||||||
|
recyclarr config create
|
||||||
|
msg_ok "Installed Recyclarr"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf recyclarr*.tar.xz
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -33,7 +33,6 @@ msg_info "Updating Python3"
|
|||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-pip
|
python3-pip
|
||||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
|
||||||
$STD apt-get install -y python3-setuptools
|
$STD apt-get install -y python3-setuptools
|
||||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||||
msg_ok "Updated Python3"
|
msg_ok "Updated Python3"
|
||||||
|
|||||||
@@ -0,0 +1,89 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: kristocopani
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
mc \
|
||||||
|
git \
|
||||||
|
gpg \
|
||||||
|
sudo \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
|
||||||
|
wget -qO- "https://keyserver.ubuntu.com/pks/lookup?fingerprint=on&op=get&search=0x6125E2A8C77F2818FB7BD15B93C4A3FD7BB9C367" | gpg --dearmour >/usr/share/keyrings/ansible-archive-keyring.gpg
|
||||||
|
cat <<EOF >/etc/apt/sources.list.d/ansible.list
|
||||||
|
deb [signed-by=/usr/share/keyrings/ansible-archive-keyring.gpg] http://ppa.launchpad.net/ansible/ansible/ubuntu jammy main
|
||||||
|
EOF
|
||||||
|
$STD apt update
|
||||||
|
$STD apt install -y ansible
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setup Semaphore"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/semaphoreui/semaphore/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
mkdir -p /opt/semaphore
|
||||||
|
cd /opt/semaphore
|
||||||
|
wget -q https://github.com/semaphoreui/semaphore/releases/download/v${RELEASE}/semaphore_${RELEASE}_linux_arm64.deb
|
||||||
|
$STD dpkg -i semaphore_${RELEASE}_linux_arm64.deb
|
||||||
|
|
||||||
|
SEM_HASH=$(openssl rand -base64 32)
|
||||||
|
SEM_ENCRYPTION=$(openssl rand -base64 32)
|
||||||
|
SEM_KEY=$(openssl rand -base64 32)
|
||||||
|
SEM_PW=$(openssl rand -base64 12)
|
||||||
|
cat <<EOF >/opt/semaphore/config.json
|
||||||
|
{
|
||||||
|
"bolt": {
|
||||||
|
"host": "/opt/semaphore/semaphore_db.bolt"
|
||||||
|
},
|
||||||
|
"tmp_path": "/opt/semaphore/tmp",
|
||||||
|
"cookie_hash": "${SEM_HASH}",
|
||||||
|
"cookie_encryption": "${SEM_ENCRYPTION}",
|
||||||
|
"access_key_encryption": "${SEM_KEY}"
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
$STD semaphore user add --admin --login admin --email admin@helper-scripts.com --name Administrator --password ${SEM_PW} --config /opt/semaphore/config.json
|
||||||
|
echo "${SEM_PW}" >~/semaphore.creds
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
msg_ok "Setup Semaphore"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/semaphore.service
|
||||||
|
[Unit]
|
||||||
|
Description=Semaphore UI
|
||||||
|
Documentation=https://docs.semaphoreui.com/
|
||||||
|
Wants=network-online.target
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/usr/bin/semaphore server --config /opt/semaphore/config.json
|
||||||
|
Restart=always
|
||||||
|
RestartSec=10s
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl enable --now -q semaphore.service
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf semaphore_${RELEASE}_linux_arm64.deb
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -25,8 +25,9 @@ msg_ok "Installed Dependencies"
|
|||||||
|
|
||||||
msg_info "Installing Golang"
|
msg_info "Installing Golang"
|
||||||
set +o pipefail
|
set +o pipefail
|
||||||
wget -q https://golang.org/dl/go1.22.2.linux-arm64.tar.gz
|
RELEASE=$(curl -s https://go.dev/dl/ | grep -o "go.*\linux-arm64.tar.gz" | head -n 1)
|
||||||
tar -xzf go1.22.2.linux-arm64.tar.gz -C /usr/local
|
wget -q https://golang.org/dl/$RELEASE
|
||||||
|
tar -xzf $RELEASE -C /usr/local
|
||||||
$STD ln -s /usr/local/go/bin/go /usr/local/bin/go
|
$STD ln -s /usr/local/go/bin/go /usr/local/bin/go
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
msg_ok "Installed Golang"
|
msg_ok "Installed Golang"
|
||||||
@@ -42,7 +43,7 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -rf go1.22.2.linux-arm64.tar.gz
|
rm -rf $RELEASE
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: Dominik Siebel (dsiebel)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing Silverbullet"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/silverbulletmd/silverbullet/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
mkdir -p /opt/silverbullet/bin /opt/silverbullet/space
|
||||||
|
wget -q https://github.com/silverbulletmd/silverbullet/releases/download/${RELEASE}/silverbullet-server-linux-aarch64.zip
|
||||||
|
unzip -oq -d /opt/silverbullet/bin/ silverbullet-server-linux-aarch64.zip
|
||||||
|
chmod +x /opt/silverbullet/bin/silverbullet
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
msg_ok "Installed Silverbullet"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
|
||||||
|
cat <<EOF >/etc/systemd/system/silverbullet.service
|
||||||
|
[Unit]
|
||||||
|
Description=Silverbullet Daemon
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/opt/silverbullet/bin/silverbullet --hostname 0.0.0.0 --port 3000 /opt/silverbullet/space
|
||||||
|
WorkingDirectory=/opt/silverbullet
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable --now -q silverbullet
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf silverbullet-server-linux-aarch64.zip
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
|
#Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: Michel Roegl-Brunner (michelroegl-brunner)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
composer \
|
||||||
|
git \
|
||||||
|
sudo \
|
||||||
|
mc \
|
||||||
|
nginx \
|
||||||
|
php8.2-{bcmath,common,ctype,curl,fileinfo,fpm,gd,iconv,intl,mbstring,mysql,soap,xml,xsl,zip,cli} \
|
||||||
|
mariadb-server \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up database"
|
||||||
|
DB_NAME=snipeit_db
|
||||||
|
DB_USER=snipeit
|
||||||
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
|
mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||||
|
mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||||
|
mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||||
|
{
|
||||||
|
echo "SnipeIT-Credentials"
|
||||||
|
echo "SnipeIT Database User: $DB_USER"
|
||||||
|
echo "SnipeIT Database Password: $DB_PASS"
|
||||||
|
echo "SnipeIT Database Name: $DB_NAME"
|
||||||
|
} >> ~/snipeit.creds
|
||||||
|
msg_ok "Set up database"
|
||||||
|
|
||||||
|
msg_info "Installing Snipe-IT"
|
||||||
|
cd /opt
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/snipe/snipe-it/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
wget -q "https://github.com/snipe/snipe-it/archive/refs/tags/v${RELEASE}.zip"
|
||||||
|
unzip -q v${RELEASE}.zip
|
||||||
|
mv snipe-it-${RELEASE} /opt/snipe-it
|
||||||
|
|
||||||
|
cd /opt/snipe-it
|
||||||
|
cp .env.example .env
|
||||||
|
IPADDRESS=$(hostname -I | awk '{print $1}')
|
||||||
|
|
||||||
|
sed -i -e "s|^APP_URL=.*|APP_URL=http://$IPADDRESS|" \
|
||||||
|
-e "s|^DB_DATABASE=.*|DB_DATABASE=$DB_NAME|" \
|
||||||
|
-e "s|^DB_USERNAME=.*|DB_USERNAME=$DB_USER|" \
|
||||||
|
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=$DB_PASS|" .env
|
||||||
|
|
||||||
|
chown -R www-data: /opt/snipe-it
|
||||||
|
chmod -R 755 /opt/snipe-it
|
||||||
|
|
||||||
|
|
||||||
|
export COMPOSER_ALLOW_SUPERUSER=1
|
||||||
|
$STD composer update --no-plugins --no-scripts
|
||||||
|
$STD composer install --no-dev --prefer-source --no-plugins --no-scripts
|
||||||
|
|
||||||
|
$STD php artisan key:generate --force
|
||||||
|
msg_ok "Installed SnipeIT"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
|
||||||
|
cat <<EOF >/etc/nginx/conf.d/snipeit.conf
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
root /opt/snipe-it/public;
|
||||||
|
server_name $IPADDRESS;
|
||||||
|
index index.php;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files \$uri \$uri/ /index.php?\$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php\$ {
|
||||||
|
include fastcgi.conf;
|
||||||
|
include snippets/fastcgi-php.conf;
|
||||||
|
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.+)\$;
|
||||||
|
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl reload nginx
|
||||||
|
msg_ok "Configured Service"
|
||||||
|
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/v${RELEASE}.zip
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://github.com/Donkie/Spoolman
|
# Source: https://github.com/Donkie/Spoolman
|
||||||
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
@@ -34,15 +34,15 @@ $STD apt-get install -y \
|
|||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
python3-wheel \
|
python3-wheel \
|
||||||
python3-pip
|
python3-pip
|
||||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
|
||||||
msg_ok "Installed Python3"
|
msg_ok "Installed Python3"
|
||||||
|
|
||||||
msg_info "Installing Spoolman"
|
msg_info "Installing Spoolman"
|
||||||
RELEASE=$(wget -q https://github.com/Donkie/Spoolman/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
RELEASE=$(wget -q https://github.com/Donkie/Spoolman/releases/latest -O - | grep "title>Release" | cut -d " " -f 4)
|
||||||
|
cd /opt
|
||||||
wget -q https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolman.zip
|
wget -q https://github.com/Donkie/Spoolman/releases/download/$RELEASE/spoolman.zip
|
||||||
unzip -q spoolman.zip -d spoolman
|
unzip -q spoolman.zip -d spoolman
|
||||||
rm -rf spoolman.zip
|
rm -rf spoolman.zip
|
||||||
cd /opt/spoolman
|
cd spoolman
|
||||||
$STD pip3 install -r requirements.txt
|
$STD pip3 install -r requirements.txt
|
||||||
wget -q https://raw.githubusercontent.com/Donkie/Spoolman/master/.env.example -O .env
|
wget -q https://raw.githubusercontent.com/Donkie/Spoolman/master/.env.example -O .env
|
||||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: Dominik Siebel (dsiebel)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
libubsan1 \
|
||||||
|
ffmpeg \
|
||||||
|
curl \
|
||||||
|
ca-certificates \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing TeddyCloud"
|
||||||
|
RELEASE="$(curl -s https://api.github.com/repos/toniebox-reverse-engineering/teddycloud/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')"
|
||||||
|
VERSION="${RELEASE#tc_v}"
|
||||||
|
wget -q "https://github.com/toniebox-reverse-engineering/teddycloud/releases/download/${RELEASE}/teddycloud.amd64.release_v${VERSION}.zip"
|
||||||
|
unzip -q -d "/opt/teddycloud-${VERSION}" "teddycloud.amd64.release_v${VERSION}.zip"
|
||||||
|
ln -fns "/opt/teddycloud-${VERSION}" /opt/teddycloud
|
||||||
|
echo "${VERSION}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
msg_ok "Installed TeddyCloud"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/systemd/system/teddycloud.service
|
||||||
|
[Unit]
|
||||||
|
Description=TeddyCloud Server
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/opt/teddycloud/teddycloud
|
||||||
|
WorkingDirectory=/opt/teddycloud
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
systemctl enable --now -q teddycloud
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt-get --yes autoremove
|
||||||
|
$STD apt-get --yes autoclean
|
||||||
|
rm -rf "teddycloud.amd64.release_v${VERSION}.zip"
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: kristocopani
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
gpg \
|
||||||
|
wget \
|
||||||
|
mc \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
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
|
||||||
|
$STD npm install --global yarn
|
||||||
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
|
msg_info "Installing The Lounge"
|
||||||
|
cd /opt
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/thelounge/thelounge-deb/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
wget -q https://github.com/thelounge/thelounge-deb/releases/download/v${RELEASE}/thelounge_${RELEASE}_all.deb
|
||||||
|
$STD dpkg -i ./thelounge_${RELEASE}_all.deb
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
msg_ok "Installed The Lounge"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/thelounge_${RELEASE}_all.deb
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -18,6 +18,7 @@ $STD apt-get install -y curl
|
|||||||
$STD apt-get install -y sudo
|
$STD apt-get install -y sudo
|
||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
$STD apt-get install -y openssh-server
|
$STD apt-get install -y openssh-server
|
||||||
|
$STD apt-get install -y wget
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/TriliumNext/Notes/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: tlissak
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://typesense.org/
|
||||||
|
|
||||||
|
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 \
|
||||||
|
mc \
|
||||||
|
sudo \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing TypeSense"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/typesense/typesense/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||||
|
cd /opt
|
||||||
|
wget -q https://dl.typesense.org/releases/${RELEASE}/typesense-server-${RELEASE}-amd64.deb
|
||||||
|
$STD apt install -y /opt/typesense-server-${RELEASE}-amd64.deb
|
||||||
|
echo 'enable-cors = true' >> /etc/typesense/typesense-server.ini
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
|
msg_ok "Installed TypeSense"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/typesense-server-${RELEASE}-amd64.deb
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -39,7 +39,7 @@ msg_ok "Installed Node.js"
|
|||||||
msg_info "Setting up postgresql"
|
msg_info "Setting up postgresql"
|
||||||
DB_NAME=umamidb
|
DB_NAME=umamidb
|
||||||
DB_USER=umami
|
DB_USER=umami
|
||||||
DB_PASS="$(openssl rand -base64 18 | cut -c1-13)"
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
SECRET_KEY="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 32)"
|
||||||
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
$STD sudo -u postgres psql -c "CREATE ROLE $DB_USER WITH LOGIN PASSWORD '$DB_PASS';"
|
||||||
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
$STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCODING 'UTF8' TEMPLATE template0;"
|
||||||
|
|||||||
@@ -0,0 +1,96 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: wimb0
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
sudo \
|
||||||
|
curl \
|
||||||
|
mc \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing Unbound"
|
||||||
|
$STD apt-get install -y \
|
||||||
|
unbound \
|
||||||
|
unbound-host
|
||||||
|
msg_info "Installed Unbound"
|
||||||
|
|
||||||
|
cat <<EOF >/etc/unbound/unbound.conf.d/unbound.conf
|
||||||
|
server:
|
||||||
|
interface: 0.0.0.0
|
||||||
|
port: 5335
|
||||||
|
do-ip6: no
|
||||||
|
hide-identity: yes
|
||||||
|
hide-version: yes
|
||||||
|
harden-referral-path: yes
|
||||||
|
cache-min-ttl: 300
|
||||||
|
cache-max-ttl: 14400
|
||||||
|
serve-expired: yes
|
||||||
|
serve-expired-ttl: 3600
|
||||||
|
prefetch: yes
|
||||||
|
prefetch-key: yes
|
||||||
|
target-fetch-policy: "3 2 1 1 1"
|
||||||
|
unwanted-reply-threshold: 10000000
|
||||||
|
rrset-cache-size: 256m
|
||||||
|
msg-cache-size: 128m
|
||||||
|
so-rcvbuf: 1m
|
||||||
|
private-address: 192.168.0.0/16
|
||||||
|
private-address: 169.254.0.0/16
|
||||||
|
private-address: 172.16.0.0/12
|
||||||
|
private-address: 10.0.0.0/8
|
||||||
|
private-address: fd00::/8
|
||||||
|
private-address: fe80::/10
|
||||||
|
access-control: 192.168.0.0/16 allow
|
||||||
|
access-control: 172.16.0.0/12 allow
|
||||||
|
access-control: 10.0.0.0/8 allow
|
||||||
|
access-control: 127.0.0.1/32 allow
|
||||||
|
chroot: ""
|
||||||
|
logfile: /var/log/unbound.log
|
||||||
|
EOF
|
||||||
|
|
||||||
|
touch /var/log/unbound.log
|
||||||
|
chown unbound:unbound /var/log/unbound.log
|
||||||
|
|
||||||
|
systemctl restart unbound
|
||||||
|
msg_ok "Installed Unbound"
|
||||||
|
|
||||||
|
msg_ok "Configuring Logrotate"
|
||||||
|
cat <<EOF >/etc/logrotate.d/unbound
|
||||||
|
/var/log/unbound.log {
|
||||||
|
daily
|
||||||
|
rotate 7
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
sharedscripts
|
||||||
|
create 644
|
||||||
|
postrotate
|
||||||
|
/usr/sbin/unbound-control log_reopen
|
||||||
|
endscript
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl restart logrotate
|
||||||
|
msg_ok "Configured Logrotate"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: MickLesk (Canbiz)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
make \
|
||||||
|
mc \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setup Vikunja (Patience)"
|
||||||
|
cd /opt
|
||||||
|
RELEASE=$(curl -s https://dl.vikunja.io/vikunja/ | grep -oP 'href="/vikunja/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1)
|
||||||
|
wget -q "https://dl.vikunja.io/vikunja/$RELEASE/vikunja-$RELEASE-amd64.deb"
|
||||||
|
$STD dpkg -i vikunja-$RELEASE-amd64.deb
|
||||||
|
sed -i 's|^ timezone: .*| timezone: UTC|' /etc/vikunja/config.yml
|
||||||
|
sed -i 's|"./vikunja.db"|"/etc/vikunja/vikunja.db"|' /etc/vikunja/config.yml
|
||||||
|
sed -i 's|./files|/etc/vikunja/files|' /etc/vikunja/config.yml
|
||||||
|
systemctl start vikunja.service
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
msg_ok "Installed Vikunja"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/vikunja-$RELEASE-amd64.deb
|
||||||
|
$STD apt-get autoremove
|
||||||
|
$STD apt-get autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck
|
# Author: tteck
|
||||||
# Co-Author: MickLesk (Canbiz)
|
# Co-Author: MickLesk (Canbiz)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://github.com/ellite/wallos
|
# Source: https://github.com/ellite/wallos
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
@@ -22,7 +22,10 @@ $STD apt-get install -y \
|
|||||||
mc \
|
mc \
|
||||||
apache2 \
|
apache2 \
|
||||||
libapache2-mod-php \
|
libapache2-mod-php \
|
||||||
php8.2-{mbstring,gd,curl,intl,imagick,bz2,sqlite3,zip,xml}
|
php8.2-{mbstring,gd,curl,intl,imagick,bz2,sqlite3,zip,xml} \
|
||||||
|
wget \
|
||||||
|
openssh-server \
|
||||||
|
cron
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Wallos (Patience)"
|
msg_info "Installing Wallos (Patience)"
|
||||||
@@ -59,6 +62,7 @@ $STD curl http://localhost/endpoints/db/migrate.php
|
|||||||
msg_ok "Installed Wallos"
|
msg_ok "Installed Wallos"
|
||||||
|
|
||||||
msg_info "Setting up Crontabs"
|
msg_info "Setting up Crontabs"
|
||||||
|
mkdir -p /var/log/cron
|
||||||
cat <<EOF > /opt/wallos.cron
|
cat <<EOF > /opt/wallos.cron
|
||||||
0 1 * * * php /opt/wallos/endpoints/cronjobs/updatenextpayment.php >> /var/log/cron/updatenextpayment.log 2>&1
|
0 1 * * * php /opt/wallos/endpoints/cronjobs/updatenextpayment.php >> /var/log/cron/updatenextpayment.log 2>&1
|
||||||
0 2 * * * php /opt/wallos/endpoints/cronjobs/updateexchange.php >> /var/log/cron/updateexchange.log 2>&1
|
0 2 * * * php /opt/wallos/endpoints/cronjobs/updateexchange.php >> /var/log/cron/updateexchange.log 2>&1
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: Don Locke (DonLocke)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/wavelog/wavelog
|
||||||
|
|
||||||
|
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 \
|
||||||
|
libapache2-mod-php \
|
||||||
|
mariadb-server \
|
||||||
|
mc \
|
||||||
|
php8.2-{curl,mbstring,mysql,xml,zip,gd} \
|
||||||
|
sudo \
|
||||||
|
unzip \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up Database"
|
||||||
|
DB_NAME=wavelog
|
||||||
|
DB_USER=waveloguser
|
||||||
|
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||||
|
$STD mysql -u root -e "CREATE DATABASE $DB_NAME;"
|
||||||
|
$STD mysql -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED WITH mysql_native_password AS PASSWORD('$DB_PASS');"
|
||||||
|
$STD mysql -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||||
|
{
|
||||||
|
echo "Wavelog-Credentials"
|
||||||
|
echo "Wavelog Database User: $DB_USER"
|
||||||
|
echo "Wavelog Database Password: $DB_PASS"
|
||||||
|
echo "Wavelog Database Name: $DB_NAME"
|
||||||
|
} >> ~/wavelog.creds
|
||||||
|
msg_ok "Set up database"
|
||||||
|
|
||||||
|
msg_info "Setting up PHP"
|
||||||
|
sed -i '/max_execution_time/s/= .*/= 600/' /etc/php/8.2/apache2/php.ini
|
||||||
|
sed -i '/memory_limit/s/= .*/= 256M/' /etc/php/8.2/apache2/php.ini
|
||||||
|
sed -i '/upload_max_filesize/s/= .*/= 8M/' /etc/php/8.2/apache2/php.ini
|
||||||
|
msg_ok "Set up PHP"
|
||||||
|
|
||||||
|
msg_info "Installing Wavelog"
|
||||||
|
RELEASE=$(curl -s https://api.github.com/repos/wavelog/wavelog/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
|
wget -q "https://github.com/wavelog/wavelog/archive/refs/tags/${RELEASE}.zip"
|
||||||
|
unzip -q ${RELEASE}.zip
|
||||||
|
mv wavelog-${RELEASE}/ /opt/wavelog
|
||||||
|
chown -R www-data:www-data /opt/wavelog/
|
||||||
|
find /opt/wavelog/ -type d -exec chmod 755 {} \;
|
||||||
|
find /opt/wavelog/ -type f -exec chmod 664 {} \;
|
||||||
|
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||||
|
msg_ok "Installed Wavelog"
|
||||||
|
|
||||||
|
msg_info "Creating Service"
|
||||||
|
cat <<EOF >/etc/apache2/sites-available/wavelog.conf
|
||||||
|
<VirtualHost *:80>
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
DocumentRoot /opt/wavelog
|
||||||
|
|
||||||
|
<Directory /opt/wavelog>
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride All
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog /var/log/apache2/error.log
|
||||||
|
CustomLog /var/log/apache2/access.log combined
|
||||||
|
</VirtualHost>
|
||||||
|
EOF
|
||||||
|
$STD a2ensite wavelog.conf
|
||||||
|
$STD a2dissite 000-default.conf
|
||||||
|
$STD systemctl reload apache2
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -f ${RELEASE}.zip
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -38,6 +38,19 @@ echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf
|
|||||||
$STD sysctl -p /etc/sysctl.conf
|
$STD sysctl -p /etc/sysctl.conf
|
||||||
msg_ok "Installed WGDashboard"
|
msg_ok "Installed WGDashboard"
|
||||||
|
|
||||||
|
msg_info "Create Example Config for WGDashboard"
|
||||||
|
private_key=$(wg genkey)
|
||||||
|
cat <<EOF >/etc/wireguard/wg0.conf
|
||||||
|
[Interface]
|
||||||
|
PrivateKey = ${private_key}
|
||||||
|
Address = 10.0.0.1/24
|
||||||
|
SaveConfig = true
|
||||||
|
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;
|
||||||
|
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE;
|
||||||
|
ListenPort = 51820
|
||||||
|
EOF
|
||||||
|
msg_ok "Created Example Config for WGDashboard"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/wg-dashboard.service
|
cat <<EOF >/etc/systemd/system/wg-dashboard.service
|
||||||
[Unit]
|
[Unit]
|
||||||
|
|||||||
+17
-14
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -14,19 +14,21 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y curl
|
$STD apt-get install -y \
|
||||||
$STD apt-get install -y sudo
|
curl \
|
||||||
$STD apt-get install -y mc
|
sudo \
|
||||||
$STD apt-get install -y wget
|
mc \
|
||||||
$STD apt-get install -y openssh-server
|
wget \
|
||||||
|
openssh-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Zabbix"
|
msg_info "Installing Zabbix"
|
||||||
wget -q https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_7.0-1+debian12_all.deb
|
cd /tmp
|
||||||
$STD dpkg -i zabbix-release_7.0-1+debian12_all.deb
|
wget -q https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb
|
||||||
rm zabbix-release_7.0-1+debian12_all.deb
|
$STD dpkg -i /tmp/zabbix-release_latest+debian12_all.deb
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y zabbix-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent
|
$STD apt-get install -y zabbix-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-apache-conf zabbix-sql-scripts
|
||||||
|
$STD apt-get install -y zabbix-agent2 zabbix-agent2-plugin-*
|
||||||
msg_ok "Installed Zabbix"
|
msg_ok "Installed Zabbix"
|
||||||
|
|
||||||
msg_info "Setting up PostgreSQL"
|
msg_info "Setting up PostgreSQL"
|
||||||
@@ -39,7 +41,7 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO
|
|||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
|
||||||
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
|
||||||
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME &>/dev/null
|
zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME &>/dev/null
|
||||||
sed -i "s/^DBName=.*/DBName=$DB_NAME/" /etc/zabbix/zabbix_server.conf
|
sed -i "s/^DBName=.*/DBName=$DB_NAME/" /etc/zabbix/zabbix_server.conf
|
||||||
sed -i "s/^DBUser=.*/DBUser=$DB_USER/" /etc/zabbix/zabbix_server.conf
|
sed -i "s/^DBUser=.*/DBUser=$DB_USER/" /etc/zabbix/zabbix_server.conf
|
||||||
sed -i "s/^# DBPassword=.*/DBPassword=$DB_PASS/" /etc/zabbix/zabbix_server.conf
|
sed -i "s/^# DBPassword=.*/DBPassword=$DB_PASS/" /etc/zabbix/zabbix_server.conf
|
||||||
@@ -52,14 +54,15 @@ echo -e "zabbix Database Name: \e[32m$DB_NAME\e[0m" >>~/zabbix.creds
|
|||||||
msg_ok "Set up PostgreSQL"
|
msg_ok "Set up PostgreSQL"
|
||||||
|
|
||||||
msg_info "Starting Services"
|
msg_info "Starting Services"
|
||||||
systemctl restart zabbix-server zabbix-agent apache2
|
systemctl restart zabbix-server zabbix-agent2 apache2
|
||||||
systemctl enable -q zabbix-server zabbix-agent apache2
|
systemctl enable -q --now zabbix-server zabbix-agent2 apache2
|
||||||
msg_ok "Started Services"
|
msg_ok "Started Services"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /tmp/zabbix-release_latest+debian12_all.deb
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
#Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: Michel Roegl-Brunner (michelroegl-brunner)
|
||||||
|
# License: MIT
|
||||||
|
# https://github.com/community-scripts/ProxmoxVE/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 \
|
||||||
|
git \
|
||||||
|
sudo \
|
||||||
|
gpg \
|
||||||
|
wget \
|
||||||
|
nginx \
|
||||||
|
apt-transport-https \
|
||||||
|
gnupg \
|
||||||
|
wget \
|
||||||
|
openssh-server
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Setting up Elasticsearch"
|
||||||
|
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list >/dev/null
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get -y install elasticsearch
|
||||||
|
echo "-Xms2g" >>/etc/elasticsearch/jvm.options
|
||||||
|
echo "-Xmx2g" >>/etc/elasticsearch/jvm.options
|
||||||
|
$STD /usr/share/elasticsearch/bin/elasticsearch-plugin install ingest-attachment -b
|
||||||
|
systemctl -q restart elasticsearch
|
||||||
|
msg_ok "Setup Elasticsearch"
|
||||||
|
|
||||||
|
msg_info "Installing Zammad"
|
||||||
|
curl -fsSL https://dl.packager.io/srv/zammad/zammad/key | gpg --dearmor | sudo tee /etc/apt/keyrings/pkgr-zammad.gpg >/dev/null
|
||||||
|
echo "deb [signed-by=/etc/apt/keyrings/pkgr-zammad.gpg] https://dl.packager.io/srv/deb/zammad/zammad/stable/debian 12 main" | sudo tee /etc/apt/sources.list.d/zammad.list >/dev/null
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get -y install zammad
|
||||||
|
$STD zammad run rails r "Setting.set('es_url', 'http://localhost:9200')"
|
||||||
|
$STD zammad run rake zammad:searchindex:rebuild
|
||||||
|
msg_ok "Installed Zammad"
|
||||||
|
|
||||||
|
msg_info "Setup Services"
|
||||||
|
cp /opt/zammad/contrib/nginx/zammad.conf /etc/nginx/sites-available/zammad.conf
|
||||||
|
IPADDRESS=$(hostname -I | awk '{print $1}')
|
||||||
|
sed -i "s/server_name localhost;/server_name $IPADDRESS;/g" /etc/nginx/sites-available/zammad.conf
|
||||||
|
$STD systemctl reload nginx
|
||||||
|
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,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -14,23 +14,24 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y curl
|
$STD apt-get install -y \
|
||||||
$STD apt-get install -y sudo
|
curl \
|
||||||
$STD apt-get install -y mc
|
sudo \
|
||||||
$STD apt-get install -y git
|
mc \
|
||||||
$STD apt-get install -y make
|
git \
|
||||||
$STD apt-get install -y g++
|
make \
|
||||||
$STD apt-get install -y gcc
|
g++ \
|
||||||
$STD apt-get install -y ca-certificates
|
gcc \
|
||||||
$STD apt-get install -y gnupg
|
ca-certificates \
|
||||||
$STD apt-get install -y wget
|
gnupg \
|
||||||
$STD apt-get install -y openssh-server
|
wget \
|
||||||
|
openssh-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Setting up Node.js Repository"
|
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_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
|
||||||
msg_ok "Set up Node.js Repository"
|
msg_ok "Set up Node.js Repository"
|
||||||
|
|
||||||
msg_info "Installing Node.js"
|
msg_info "Installing Node.js"
|
||||||
@@ -38,49 +39,47 @@ $STD apt-get update
|
|||||||
$STD apt-get install -y nodejs
|
$STD apt-get install -y nodejs
|
||||||
msg_ok "Installed Node.js"
|
msg_ok "Installed Node.js"
|
||||||
|
|
||||||
msg_info "Setting up Zigbee2MQTT Repository"
|
msg_info "Installing pnpm"
|
||||||
$STD git clone --depth 1 https://github.com/Koenkk/zigbee2mqtt.git /opt/zigbee2mqtt
|
$STD npm install -g pnpm
|
||||||
msg_ok "Set up Zigbee2MQTT Repository"
|
msg_ok "Installed pnpm"
|
||||||
|
|
||||||
read -r -p "Switch to Edge/dev branch? (y/N) " prompt
|
msg_info "Setting up Zigbee2MQTT"
|
||||||
if [[ $prompt == "y" ]]; then
|
cd /opt
|
||||||
DEV="y"
|
RELEASE=$(curl -s https://api.github.com/repos/Koenkk/zigbee2mqtt/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
else
|
wget -q "https://github.com/Koenkk/zigbee2mqtt/archive/refs/tags/${RELEASE}.zip"
|
||||||
DEV="n"
|
unzip -q ${RELEASE}.zip
|
||||||
fi
|
mv zigbee2mqtt-${RELEASE} /opt/zigbee2mqtt
|
||||||
|
cd /opt/zigbee2mqtt/data
|
||||||
msg_info "Installing Zigbee2MQTT"
|
mv configuration.example.yaml configuration.yaml
|
||||||
cd /opt/zigbee2mqtt
|
cd /opt/zigbee2mqtt
|
||||||
if [[ $DEV == "y" ]]; then
|
$STD pnpm install --frozen-lockfile
|
||||||
$STD git fetch origin dev:dev
|
$STD pnpm build
|
||||||
$STD git checkout dev
|
|
||||||
$STD git pull
|
|
||||||
fi
|
|
||||||
$STD npm ci
|
|
||||||
msg_ok "Installed Zigbee2MQTT"
|
msg_ok "Installed Zigbee2MQTT"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
service_path="/etc/systemd/system/zigbee2mqtt.service"
|
cat <<EOF >/etc/systemd/system/zigbee2mqtt.service
|
||||||
echo "[Unit]
|
[Unit]
|
||||||
Description=zigbee2mqtt
|
Description=zigbee2mqtt
|
||||||
After=network.target
|
After=network.target
|
||||||
[Service]
|
[Service]
|
||||||
Environment=NODE_ENV=production
|
Environment=NODE_ENV=production
|
||||||
ExecStart=/usr/bin/npm start
|
ExecStart=/usr/bin/pnpm start
|
||||||
WorkingDirectory=/opt/zigbee2mqtt
|
WorkingDirectory=/opt/zigbee2mqtt
|
||||||
StandardOutput=inherit
|
StandardOutput=inherit
|
||||||
StandardError=inherit
|
StandardError=inherit
|
||||||
Restart=always
|
Restart=always
|
||||||
User=root
|
User=root
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" >$service_path
|
WantedBy=multi-user.target
|
||||||
$STD systemctl enable zigbee2mqtt.service
|
EOF
|
||||||
|
systemctl enable -q --now zigbee2mqtt.service
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/${RELEASE}.zip
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2025 tteck
|
||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
|
||||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
@@ -14,35 +14,45 @@ network_check
|
|||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y curl
|
$STD apt-get install -y \
|
||||||
$STD apt-get install -y sudo
|
curl \
|
||||||
$STD apt-get install -y mc
|
sudo \
|
||||||
$STD apt-get install -y wget
|
mc \
|
||||||
$STD apt-get install -y openssh-server
|
wget \
|
||||||
|
openssh-server
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing Z-Wave JS UI"
|
msg_info "Installing Z-Wave JS UI"
|
||||||
mkdir /opt/zwave-js-ui
|
mkdir -p /opt/zwave-js-ui
|
||||||
|
mkdir -p /opt/zwave_store
|
||||||
cd /opt/zwave-js-ui
|
cd /opt/zwave-js-ui
|
||||||
RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
RELEASE=$(curl -s https://api.github.com/repos/zwave-js/zwave-js-ui/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
||||||
$STD wget https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux-arm64.zip
|
wget -q https://github.com/zwave-js/zwave-js-ui/releases/download/${RELEASE}/zwave-js-ui-${RELEASE}-linux-arm64.zip
|
||||||
$STD unzip zwave-js-ui-${RELEASE}-linux-arm64.zip
|
unzip -q zwave-js-ui-${RELEASE}-linux-arm64.zip
|
||||||
|
cat <<EOF >/opt/.env
|
||||||
|
ZWAVEJS_EXTERNAL_CONFIG=/opt/zwave_store/.config-db
|
||||||
|
STORE_DIR=/opt/zwave_store
|
||||||
|
EOF
|
||||||
|
echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt"
|
||||||
msg_ok "Installed Z-Wave JS UI"
|
msg_ok "Installed Z-Wave JS UI"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
service_path="/etc/systemd/system/zwave-js-ui.service"
|
cat <<EOF > /etc/systemd/system/zwave-js-ui.service
|
||||||
echo "[Unit]
|
[Unit]
|
||||||
Description=zwave-js-ui
|
Description=zwave-js-ui
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=root
|
User=root
|
||||||
WorkingDirectory=/opt/zwave-js-ui
|
WorkingDirectory=/opt/zwave-js-ui
|
||||||
ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux
|
ExecStart=/opt/zwave-js-ui/zwave-js-ui-linux
|
||||||
|
EnvironmentFile=/opt/.env
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target" >$service_path
|
WantedBy=multi-user.target
|
||||||
systemctl start zwave-js-ui
|
EOF
|
||||||
$STD systemctl enable zwave-js-ui
|
systemctl enable -q --now zwave-js-ui
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
|||||||
Reference in New Issue
Block a user