Remove BentoPDF and YOURLS scripts
Delete container templates and installer scripts for BentoPDF and YOURLS. Removed ct/bentopdf.sh, ct/yourls.sh, install/bentopdf-install.sh, and install/yourls-install.sh which contained container build/install logic (nginx, Node/PNPM steps for BentoPDF and PHP/MariaDB/nginx setup for YOURLS). This cleans up deprecated or duplicated setup scripts.
This commit is contained in:
@@ -1,79 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: vhsdream
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/alam00000/bentopdf
|
||||
|
||||
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 nginx -y
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
fetch_and_deploy_gh_release "bentopdf" "alam00000/bentopdf" "tarball" "latest" "/opt/bentopdf"
|
||||
|
||||
msg_info "Setup BentoPDF"
|
||||
cd /opt/bentopdf
|
||||
$STD npm ci --no-audit --no-fund
|
||||
cp ./.env.example ./.env.production
|
||||
export NODE_OPTIONS="--max-old-space-size=3072"
|
||||
export SIMPLE_MODE=true
|
||||
export VITE_USE_CDN=true
|
||||
$STD npm run build:all
|
||||
msg_ok "Setup BentoPDF"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<'EOF' >/etc/nginx/sites-available/bentopdf
|
||||
server {
|
||||
listen 8080;
|
||||
server_name _;
|
||||
root /opt/bentopdf/dist;
|
||||
index index.html;
|
||||
|
||||
# Required for LibreOffice WASM (Word/Excel/PowerPoint to PDF via SharedArrayBuffer)
|
||||
add_header Cross-Origin-Opener-Policy "same-origin" always;
|
||||
add_header Cross-Origin-Embedder-Policy "require-corp" always;
|
||||
add_header Cross-Origin-Resource-Policy "cross-origin" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
|
||||
gzip_static on;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ $uri.html =404;
|
||||
}
|
||||
|
||||
error_page 404 /404.html;
|
||||
}
|
||||
EOF
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
ln -sf /etc/nginx/sites-available/bentopdf /etc/nginx/sites-enabled/bentopdf
|
||||
cat <<'EOF' >/etc/systemd/system/bentopdf.service
|
||||
[Unit]
|
||||
Description=BentoPDF Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/sbin/nginx -g "daemon off;"
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
|
||||
systemctl enable -q --now bentopdf
|
||||
msg_ok "Created & started service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,91 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://yourls.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 install -y nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
setup_mariadb
|
||||
MARIADB_DB_NAME="yourls" MARIADB_DB_USER="yourls" setup_mariadb_db
|
||||
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="mysql,mbstring,gd,xml,curl" setup_php
|
||||
|
||||
fetch_and_deploy_gh_release "yourls" "YOURLS/YOURLS" "tarball"
|
||||
|
||||
msg_info "Configuring YOURLS"
|
||||
COOKIEKEY=$(openssl rand -hex 24)
|
||||
YOURLS_PASS=$(openssl rand -base64 12 | tr -dc 'a-zA-Z0-9' | cut -c1-16)
|
||||
cat <<EOF >/opt/yourls/user/config.php
|
||||
<?php
|
||||
define( 'YOURLS_DB_USER', '${MARIADB_DB_USER}' );
|
||||
define( 'YOURLS_DB_PASS', '${MARIADB_DB_PASS}' );
|
||||
define( 'YOURLS_DB_NAME', '${MARIADB_DB_NAME}' );
|
||||
define( 'YOURLS_DB_HOST', 'localhost' );
|
||||
define( 'YOURLS_DB_PREFIX', 'yourls_' );
|
||||
define( 'YOURLS_SITE', 'http://${LOCAL_IP}' );
|
||||
define( 'YOURLS_LANG', '' );
|
||||
define( 'YOURLS_UNIQUE_URLS', true );
|
||||
define( 'YOURLS_PRIVATE', true );
|
||||
define( 'YOURLS_COOKIEKEY', '${COOKIEKEY}' );
|
||||
\$yourls_user_passwords = [
|
||||
'admin' => '${YOURLS_PASS}',
|
||||
];
|
||||
define( 'YOURLS_URL_CONVERT', 36 );
|
||||
define( 'YOURLS_DEBUG', false );
|
||||
EOF
|
||||
chown -R www-data:www-data /opt/yourls
|
||||
msg_ok "Configured YOURLS"
|
||||
|
||||
msg_info "Configuring Nginx"
|
||||
cat <<EOF >/etc/nginx/sites-available/yourls
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
root /opt/yourls;
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /yourls-loader.php\$is_args\$args;
|
||||
}
|
||||
|
||||
location ~ \.php\$ {
|
||||
try_files \$uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)\$;
|
||||
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO \$fastcgi_path_info;
|
||||
}
|
||||
|
||||
location ~* \.(jpg|jpeg|gif|css|png|js|ico|woff|woff2)\$ {
|
||||
access_log off;
|
||||
expires max;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
ln -sf /etc/nginx/sites-available/yourls /etc/nginx/sites-enabled/yourls
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
$STD nginx -t
|
||||
systemctl enable -q --now nginx
|
||||
systemctl reload nginx
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in New Issue
Block a user