mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-04-30 05:45:06 +02:00
Compare commits
7 Commits
github-act
...
tremor021-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed57d19855 | ||
|
|
b78cdb4008 | ||
|
|
4963385bf9 | ||
|
|
799f3bf0fb | ||
|
|
2f6f0880ac | ||
|
|
b56e6f9e52 | ||
|
|
1c49bab0bc |
10
CHANGELOG.md
10
CHANGELOG.md
@@ -448,6 +448,16 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
</details>
|
||||
|
||||
## 2026-04-26
|
||||
|
||||
### 🆕 New Scripts
|
||||
|
||||
- TREK ([#14017](https://github.com/community-scripts/ProxmoxVE/pull/14017))
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
- fix(2fauth): handle stale backup directory on update [@omertahaoztop](https://github.com/omertahaoztop) ([#14018](https://github.com/community-scripts/ProxmoxVE/pull/14018))
|
||||
|
||||
## 2026-04-25
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
17
ct/2fauth.sh
17
ct/2fauth.sh
@@ -24,7 +24,7 @@ function update_script() {
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d "/opt/2fauth" ]]; then
|
||||
if [[ ! -d /opt/2fauth ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
@@ -34,7 +34,8 @@ function update_script() {
|
||||
$STD apt -y upgrade
|
||||
|
||||
msg_info "Creating Backup"
|
||||
mv "/opt/2fauth" "/opt/2fauth-backup"
|
||||
rm -rf /opt/2fauth-backup
|
||||
mv /opt/2fauth /opt/2fauth-backup
|
||||
if ! dpkg -l | grep -q 'php8.4'; then
|
||||
cp /etc/nginx/conf.d/2fauth.conf /etc/nginx/conf.d/2fauth.conf.bak
|
||||
fi
|
||||
@@ -46,15 +47,17 @@ function update_script() {
|
||||
fi
|
||||
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth" "tarball"
|
||||
setup_composer
|
||||
mv "/opt/2fauth-backup/.env" "/opt/2fauth/.env"
|
||||
mv "/opt/2fauth-backup/storage" "/opt/2fauth/storage"
|
||||
cd "/opt/2fauth" || return
|
||||
chown -R www-data: "/opt/2fauth"
|
||||
chmod -R 755 "/opt/2fauth"
|
||||
cp /opt/2fauth-backup/.env /opt/2fauth/.env
|
||||
cp -r /opt/2fauth-backup/storage /opt/2fauth/storage
|
||||
cd /opt/2fauth || return
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --no-dev --prefer-dist
|
||||
php artisan 2fauth:install
|
||||
chown -R www-data: /opt/2fauth
|
||||
chmod -R 755 /opt/2fauth
|
||||
$STD systemctl restart php8.4-fpm
|
||||
$STD systemctl restart nginx
|
||||
rm -rf /opt/2fauth-backup
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
|
||||
6
ct/headers/trek
Normal file
6
ct/headers/trek
Normal file
@@ -0,0 +1,6 @@
|
||||
__________ ________ __
|
||||
/_ __/ __ \/ ____/ //_/
|
||||
/ / / /_/ / __/ / ,<
|
||||
/ / / _, _/ /___/ /| |
|
||||
/_/ /_/ |_/_____/_/ |_|
|
||||
|
||||
84
ct/trek.sh
Normal file
84
ct/trek.sh
Normal file
@@ -0,0 +1,84 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/mauriceboe/TREK
|
||||
|
||||
APP="TREK"
|
||||
var_tags="${var_tags:-travel;planning;collaboration}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/trek ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "trek" "mauriceboe/TREK"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop trek
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Backing up Data"
|
||||
cp /opt/trek/server/.env /opt/trek.env.bak
|
||||
mv /opt/trek/data /opt/trek-data.bak
|
||||
mv /opt/trek/uploads /opt/trek-uploads.bak
|
||||
msg_ok "Backed up Data"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "trek" "mauriceboe/TREK" "tarball"
|
||||
|
||||
msg_info "Building Client"
|
||||
cd /opt/trek/client
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
mkdir -p /opt/trek/server/public
|
||||
cp -r /opt/trek/client/dist/* /opt/trek/server/public/
|
||||
cp -r /opt/trek/client/public/fonts /opt/trek/server/public/fonts 2>/dev/null || true
|
||||
msg_ok "Built Client"
|
||||
|
||||
msg_info "Installing Server Dependencies"
|
||||
cd /opt/trek/server
|
||||
$STD npm ci
|
||||
msg_ok "Installed Server Dependencies"
|
||||
|
||||
msg_info "Restoring Data"
|
||||
mv /opt/trek-data.bak /opt/trek/data
|
||||
mv /opt/trek-uploads.bak /opt/trek/uploads
|
||||
rm -rf /opt/trek/server/data /opt/trek/server/uploads
|
||||
ln -s /opt/trek/data /opt/trek/server/data
|
||||
ln -s /opt/trek/uploads /opt/trek/server/uploads
|
||||
cp /opt/trek.env.bak /opt/trek/server/.env
|
||||
rm -f /opt/trek.env.bak
|
||||
msg_ok "Restored Data"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start trek
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated Successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
||||
@@ -28,6 +28,7 @@ fetch_and_deploy_from_url "https://download.technitium.com/dns/DnsServerPortable
|
||||
echo "${RELEASE}" >~/.technitium
|
||||
|
||||
msg_info "Creating service"
|
||||
mkdir -p /etc/dns /var/log/technitium/dns
|
||||
sed -i '/^User=/d;/^Group=/d' /opt/technitium/dns/systemd.service
|
||||
cp /opt/technitium/dns/systemd.service /etc/systemd/system/technitium.service
|
||||
systemctl enable -q --now technitium
|
||||
|
||||
79
install/trek-install.sh
Normal file
79
install/trek-install.sh
Normal file
@@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/mauriceboe/TREK
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y build-essential
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="22" setup_nodejs
|
||||
fetch_and_deploy_gh_release "trek" "mauriceboe/TREK" "tarball"
|
||||
|
||||
msg_info "Building Client"
|
||||
cd /opt/trek/client
|
||||
$STD npm ci
|
||||
$STD npm run build
|
||||
msg_ok "Built Client"
|
||||
|
||||
msg_info "Setting up Server"
|
||||
cd /opt/trek/server
|
||||
$STD npm ci
|
||||
mkdir -p /opt/trek/server/public
|
||||
cp -r /opt/trek/client/dist/* /opt/trek/server/public/
|
||||
cp -r /opt/trek/client/public/fonts /opt/trek/server/public/fonts 2>/dev/null || true
|
||||
mkdir -p /opt/trek/{data/logs,uploads/{files,covers,avatars,photos}}
|
||||
rm -rf /opt/trek/server/data /opt/trek/server/uploads
|
||||
ln -s /opt/trek/data /opt/trek/server/data
|
||||
ln -s /opt/trek/uploads /opt/trek/server/uploads
|
||||
ENCRYPTION_KEY=$(openssl rand -hex 32)
|
||||
ADMIN_EMAIL="admin@trek.local"
|
||||
ADMIN_PASSWORD=$(openssl rand -base64 18 | tr -dc 'A-Za-z0-9' | head -c 16)
|
||||
cat <<EOF >/opt/trek/server/.env
|
||||
NODE_ENV=production
|
||||
PORT=3000
|
||||
ENCRYPTION_KEY=${ENCRYPTION_KEY}
|
||||
ADMIN_EMAIL=${ADMIN_EMAIL}
|
||||
ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
||||
COOKIE_SECURE=false
|
||||
FORCE_HTTPS=false
|
||||
LOG_LEVEL=info
|
||||
TZ=UTC
|
||||
EOF
|
||||
chmod 600 /opt/trek/server/.env
|
||||
msg_ok "Set up Server"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/trek.service
|
||||
[Unit]
|
||||
Description=TREK Travel Planner
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/trek/server
|
||||
EnvironmentFile=/opt/trek/server/.env
|
||||
ExecStart=/usr/bin/node --import tsx src/index.ts
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now trek
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user