Remove execution_mode dependencies from InstalledScriptsTab (#50)
- Remove ExecutionModeBadge import and usage - Update filtering logic to use server_name presence instead of execution_mode - Simplify update script logic by removing mode property - Update Terminal component call to determine mode based on server presence - Replace ExecutionModeBadge in table with simple text display - Maintain backend API compatibility by keeping execution_mode in mutations - Use nullish coalescing operator (??) for better null handling
This commit is contained in:
committed by
GitHub
parent
e09c1bbf5d
commit
b366a33f07
82
scripts/ct/2fauth.sh
Normal file
82
scripts/ct/2fauth.sh
Normal file
@@ -0,0 +1,82 @@
|
||||
#!/usr/bin/env bash
|
||||
SCRIPT_DIR="$(dirname "$0")"
|
||||
source "$SCRIPT_DIR/../core/build.func"
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: jkrgr0
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://docs.2fauth.app/
|
||||
|
||||
APP="2FAuth"
|
||||
var_tags="${var_tags:-2fa;authenticator}"
|
||||
var_cpu="${var_cpu:-1}"
|
||||
var_ram="${var_ram:-512}"
|
||||
var_disk="${var_disk:-2}"
|
||||
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/2fauth" ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
if check_for_gh_release "2fauth" "Bubka/2FAuth"; then
|
||||
$STD apt update
|
||||
$STD apt -y upgrade
|
||||
|
||||
msg_info "Creating Backup"
|
||||
mv "/opt/2fauth" "/opt/2fauth-backup"
|
||||
if ! dpkg -l | grep -q 'php8.3'; then
|
||||
cp /etc/nginx/conf.d/2fauth.conf /etc/nginx/conf.d/2fauth.conf.bak
|
||||
fi
|
||||
msg_ok "Backup Created"
|
||||
|
||||
if ! dpkg -l | grep -q 'php8.3'; then
|
||||
$STD apt-get install -y \
|
||||
lsb-release \
|
||||
gnupg2
|
||||
PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,mysql,cli" PHP_FPM="YES" setup_php
|
||||
sed -i 's/php8.2/php8.3/g' /etc/nginx/conf.d/2fauth.conf
|
||||
fi
|
||||
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth"
|
||||
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"
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --no-dev --prefer-source
|
||||
php artisan 2fauth:install
|
||||
$STD systemctl restart nginx
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
if dpkg -l | grep -q 'php8.2'; then
|
||||
$STD apt remove --purge -y php8.2*
|
||||
fi
|
||||
$STD apt -y autoremove
|
||||
$STD apt -y autoclean
|
||||
$STD apt -y clean
|
||||
msg_ok "Cleanup Completed"
|
||||
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}:80${CL}"
|
||||
105
scripts/install/2fauth-install.sh
Normal file
105
scripts/install/2fauth-install.sh
Normal file
@@ -0,0 +1,105 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2025 community-scripts ORG
|
||||
# Author: jkrgr0
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://docs.2fauth.app/
|
||||
|
||||
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 \
|
||||
lsb-release \
|
||||
nginx
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.3" PHP_MODULE="common,ctype,fileinfo,mysql,cli" PHP_FPM="YES" setup_php
|
||||
setup_composer
|
||||
setup_mariadb
|
||||
|
||||
msg_info "Setting up Database"
|
||||
DB_NAME=2fauth_db
|
||||
DB_USER=2fauth
|
||||
DB_PASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
|
||||
$STD mariadb -u root -e "CREATE DATABASE $DB_NAME;"
|
||||
$STD mariadb -u root -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_PASS';"
|
||||
$STD mariadb -u root -e "GRANT ALL ON $DB_NAME.* TO '$DB_USER'@'localhost'; FLUSH PRIVILEGES;"
|
||||
{
|
||||
echo "2FAuth Credentials"
|
||||
echo "Database User: $DB_USER"
|
||||
echo "Database Password: $DB_PASS"
|
||||
echo "Database Name: $DB_NAME"
|
||||
} >>~/2FAuth.creds
|
||||
msg_ok "Set up Database"
|
||||
|
||||
fetch_and_deploy_gh_release "2fauth" "Bubka/2FAuth"
|
||||
|
||||
msg_info "Setup 2FAuth"
|
||||
cd /opt/2fauth || exit
|
||||
cp .env.example .env
|
||||
IPADDRESS=$(hostname -I | awk '{print $1}')
|
||||
sed -i -e "s|^APP_URL=.*|APP_URL=http://$IPADDRESS|" \
|
||||
-e "s|^DB_CONNECTION=$|DB_CONNECTION=mysql|" \
|
||||
-e "s|^DB_DATABASE=$|DB_DATABASE=$DB_NAME|" \
|
||||
-e "s|^DB_HOST=$|DB_HOST=127.0.0.1|" \
|
||||
-e "s|^DB_PORT=$|DB_PORT=3306|" \
|
||||
-e "s|^DB_USERNAME=$|DB_USERNAME=$DB_USER|" \
|
||||
-e "s|^DB_PASSWORD=$|DB_PASSWORD=$DB_PASS|" .env
|
||||
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
|
||||
$STD php artisan migrate:refresh
|
||||
$STD php artisan passport:install -q -n
|
||||
$STD php artisan storage:link
|
||||
$STD php artisan config:cache
|
||||
chown -R www-data: /opt/2fauth
|
||||
chmod -R 755 /opt/2fauth
|
||||
msg_ok "Setup 2fauth"
|
||||
|
||||
msg_info "Configure Service"
|
||||
cat <<EOF >/etc/nginx/conf.d/2fauth.conf
|
||||
server {
|
||||
listen 80;
|
||||
root /opt/2fauth/public;
|
||||
server_name $IPADDRESS;
|
||||
index index.php;
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files \$uri \$uri/ /index.php?\$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
error_page 404 /index.php;
|
||||
|
||||
location ~ \.php\$ {
|
||||
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
|
||||
fastcgi_param SCRIPT_FILENAME \$realpath_root\$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
EOF
|
||||
systemctl reload nginx
|
||||
msg_ok "Configured Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt -y autoremove
|
||||
$STD apt -y autoclean
|
||||
$STD apt -y clean
|
||||
msg_ok "Cleaned"
|
||||
@@ -1,4 +1,84 @@
|
||||
[
|
||||
{
|
||||
"name": "sassanix/Warracker",
|
||||
"version": "0.10.1.14",
|
||||
"date": "2025-10-06T23:35:16Z"
|
||||
},
|
||||
{
|
||||
"name": "outline/outline",
|
||||
"version": "v1.0.0-1",
|
||||
"date": "2025-10-06T23:16:32Z"
|
||||
},
|
||||
{
|
||||
"name": "Ombi-app/Ombi",
|
||||
"version": "v4.47.1",
|
||||
"date": "2025-01-05T21:14:23Z"
|
||||
},
|
||||
{
|
||||
"name": "Kometa-Team/Kometa",
|
||||
"version": "v2.2.2",
|
||||
"date": "2025-10-06T21:31:07Z"
|
||||
},
|
||||
{
|
||||
"name": "booklore-app/booklore",
|
||||
"version": "v1.5.0",
|
||||
"date": "2025-10-06T20:56:57Z"
|
||||
},
|
||||
{
|
||||
"name": "grokability/snipe-it",
|
||||
"version": "v8.3.3",
|
||||
"date": "2025-10-06T19:57:17Z"
|
||||
},
|
||||
{
|
||||
"name": "meilisearch/meilisearch",
|
||||
"version": "prototype-shorten-snapshot-creation-2",
|
||||
"date": "2025-10-06T19:36:54Z"
|
||||
},
|
||||
{
|
||||
"name": "TwiN/gatus",
|
||||
"version": "v5.26.0",
|
||||
"date": "2025-10-06T17:57:27Z"
|
||||
},
|
||||
{
|
||||
"name": "seerr-team/seerr",
|
||||
"version": "preview-seerr",
|
||||
"date": "2025-10-06T16:50:29Z"
|
||||
},
|
||||
{
|
||||
"name": "zwave-js/zwave-js-ui",
|
||||
"version": "v11.4.0",
|
||||
"date": "2025-10-06T16:08:51Z"
|
||||
},
|
||||
{
|
||||
"name": "fuma-nama/fumadocs",
|
||||
"version": "fumadocs-ui@15.8.4",
|
||||
"date": "2025-10-06T15:41:49Z"
|
||||
},
|
||||
{
|
||||
"name": "bunkerity/bunkerweb",
|
||||
"version": "v1.6.5",
|
||||
"date": "2025-10-06T15:25:17Z"
|
||||
},
|
||||
{
|
||||
"name": "bastienwirtz/homer",
|
||||
"version": "v25.10.1",
|
||||
"date": "2025-10-06T14:23:20Z"
|
||||
},
|
||||
{
|
||||
"name": "chrisvel/tududi",
|
||||
"version": "v0.83",
|
||||
"date": "2025-10-06T13:49:52Z"
|
||||
},
|
||||
{
|
||||
"name": "dgtlmoon/changedetection.io",
|
||||
"version": "0.50.16",
|
||||
"date": "2025-10-06T13:40:13Z"
|
||||
},
|
||||
{
|
||||
"name": "n8n-io/n8n",
|
||||
"version": "n8n@1.114.3",
|
||||
"date": "2025-10-06T12:22:22Z"
|
||||
},
|
||||
{
|
||||
"name": "Graylog2/graylog2-server",
|
||||
"version": "7.0.0-beta.3",
|
||||
@@ -29,11 +109,6 @@
|
||||
"version": "v0.24.82",
|
||||
"date": "2025-10-06T07:56:13Z"
|
||||
},
|
||||
{
|
||||
"name": "dgtlmoon/changedetection.io",
|
||||
"version": "0.50.15",
|
||||
"date": "2025-10-06T07:15:01Z"
|
||||
},
|
||||
{
|
||||
"name": "firefly-iii/firefly-iii",
|
||||
"version": "v6.4.0",
|
||||
@@ -74,11 +149,6 @@
|
||||
"version": "4.5.3",
|
||||
"date": "2025-08-25T13:59:56Z"
|
||||
},
|
||||
{
|
||||
"name": "outline/outline",
|
||||
"version": "v1.0.0-0",
|
||||
"date": "2025-10-05T20:30:31Z"
|
||||
},
|
||||
{
|
||||
"name": "plankanban/planka",
|
||||
"version": "planka-1.0.5",
|
||||
@@ -101,19 +171,14 @@
|
||||
},
|
||||
{
|
||||
"name": "runtipi/runtipi",
|
||||
"version": "v4.4.0",
|
||||
"date": "2025-09-02T19:26:18Z"
|
||||
"version": "nightly",
|
||||
"date": "2025-10-05T14:13:25Z"
|
||||
},
|
||||
{
|
||||
"name": "Prowlarr/Prowlarr",
|
||||
"version": "v2.0.5.5160",
|
||||
"date": "2025-08-23T21:23:11Z"
|
||||
},
|
||||
{
|
||||
"name": "chrisvel/tududi",
|
||||
"version": "v0.82-rc5",
|
||||
"date": "2025-09-23T07:31:12Z"
|
||||
},
|
||||
{
|
||||
"name": "TandoorRecipes/recipes",
|
||||
"version": "2.3.0",
|
||||
@@ -159,11 +224,6 @@
|
||||
"version": "2.520",
|
||||
"date": "2025-10-05T00:51:34Z"
|
||||
},
|
||||
{
|
||||
"name": "Ombi-app/Ombi",
|
||||
"version": "v4.47.1",
|
||||
"date": "2025-01-05T21:14:23Z"
|
||||
},
|
||||
{
|
||||
"name": "ollama/ollama",
|
||||
"version": "v0.12.4-rc5",
|
||||
@@ -224,16 +284,6 @@
|
||||
"version": "2025.10.1",
|
||||
"date": "2025-10-03T18:10:59Z"
|
||||
},
|
||||
{
|
||||
"name": "fuma-nama/fumadocs",
|
||||
"version": "@fumadocs/mdx-remote@1.4.2",
|
||||
"date": "2025-10-03T17:01:32Z"
|
||||
},
|
||||
{
|
||||
"name": "bunkerity/bunkerweb",
|
||||
"version": "v1.6.5",
|
||||
"date": "2025-10-03T16:43:34Z"
|
||||
},
|
||||
{
|
||||
"name": "immich-app/immich",
|
||||
"version": "v2.0.1",
|
||||
@@ -259,11 +309,6 @@
|
||||
"version": "v0.30.1",
|
||||
"date": "2025-10-03T06:55:25Z"
|
||||
},
|
||||
{
|
||||
"name": "booklore-app/booklore",
|
||||
"version": "v1.4.1",
|
||||
"date": "2025-10-03T06:52:35Z"
|
||||
},
|
||||
{
|
||||
"name": "redis/redis",
|
||||
"version": "8.2.2",
|
||||
@@ -279,16 +324,6 @@
|
||||
"version": "v0.9.95",
|
||||
"date": "2025-10-02T16:07:18Z"
|
||||
},
|
||||
{
|
||||
"name": "meilisearch/meilisearch",
|
||||
"version": "prototype-shorten-snapshot-creation-0",
|
||||
"date": "2025-10-02T15:16:05Z"
|
||||
},
|
||||
{
|
||||
"name": "n8n-io/n8n",
|
||||
"version": "n8n@1.112.6",
|
||||
"date": "2025-09-26T10:56:27Z"
|
||||
},
|
||||
{
|
||||
"name": "theonedev/onedev",
|
||||
"version": "v13.0.7",
|
||||
@@ -389,11 +424,6 @@
|
||||
"version": "v4.4.2",
|
||||
"date": "2025-09-30T20:16:13Z"
|
||||
},
|
||||
{
|
||||
"name": "TwiN/gatus",
|
||||
"version": "v5.25.2",
|
||||
"date": "2025-09-30T18:32:35Z"
|
||||
},
|
||||
{
|
||||
"name": "WordPress/WordPress",
|
||||
"version": "4.7.31",
|
||||
@@ -414,11 +444,6 @@
|
||||
"version": "4.4.46",
|
||||
"date": "2025-09-30T13:21:24Z"
|
||||
},
|
||||
{
|
||||
"name": "fallenbagel/jellyseerr",
|
||||
"version": "preview-rename-tags",
|
||||
"date": "2025-09-30T12:50:15Z"
|
||||
},
|
||||
{
|
||||
"name": "emqx/emqx",
|
||||
"version": "e6.0.0",
|
||||
@@ -459,11 +484,6 @@
|
||||
"version": "v2.7.12",
|
||||
"date": "2025-05-29T17:08:26Z"
|
||||
},
|
||||
{
|
||||
"name": "sassanix/Warracker",
|
||||
"version": "0.10.1.13",
|
||||
"date": "2025-09-29T17:11:25Z"
|
||||
},
|
||||
{
|
||||
"name": "AdguardTeam/AdGuardHome",
|
||||
"version": "v0.107.67",
|
||||
@@ -536,8 +556,8 @@
|
||||
},
|
||||
{
|
||||
"name": "javedh-dev/tracktor",
|
||||
"version": "0.3.17",
|
||||
"date": "2025-09-27T07:00:36Z"
|
||||
"version": "0.3.18",
|
||||
"date": "2025-09-27T10:32:09Z"
|
||||
},
|
||||
{
|
||||
"name": "Dolibarr/dolibarr",
|
||||
@@ -554,11 +574,6 @@
|
||||
"version": "v4.104.2",
|
||||
"date": "2025-09-26T22:34:32Z"
|
||||
},
|
||||
{
|
||||
"name": "bastienwirtz/homer",
|
||||
"version": "v25.09.1",
|
||||
"date": "2025-09-26T19:22:16Z"
|
||||
},
|
||||
{
|
||||
"name": "traefik/traefik",
|
||||
"version": "v3.5.3",
|
||||
@@ -624,11 +639,6 @@
|
||||
"version": "v1.9.10",
|
||||
"date": "2025-09-24T13:49:53Z"
|
||||
},
|
||||
{
|
||||
"name": "zwave-js/zwave-js-ui",
|
||||
"version": "v11.3.1",
|
||||
"date": "2025-09-24T11:58:00Z"
|
||||
},
|
||||
{
|
||||
"name": "syncthing/syncthing",
|
||||
"version": "v2.0.10",
|
||||
@@ -719,11 +729,6 @@
|
||||
"version": "v0.23.2",
|
||||
"date": "2025-09-18T17:18:59Z"
|
||||
},
|
||||
{
|
||||
"name": "grokability/snipe-it",
|
||||
"version": "v8.3.2",
|
||||
"date": "2025-09-18T13:55:58Z"
|
||||
},
|
||||
{
|
||||
"name": "NLnetLabs/unbound",
|
||||
"version": "release-1.24.0",
|
||||
@@ -1039,11 +1044,6 @@
|
||||
"version": "latest",
|
||||
"date": "2025-08-15T15:33:51Z"
|
||||
},
|
||||
{
|
||||
"name": "Kometa-Team/Kometa",
|
||||
"version": "v2.2.1",
|
||||
"date": "2025-08-13T19:49:01Z"
|
||||
},
|
||||
{
|
||||
"name": "swapplications/uhf-server-dist",
|
||||
"version": "1.5.1",
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"documentation": "https://www.zigbee2mqtt.io/guide/getting-started/",
|
||||
"website": "https://www.zigbee2mqtt.io/",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/zigbee2mqtt.webp",
|
||||
"config_path": "/opt/zigbee2mqtt/data/configuration.yaml",
|
||||
"config_path": "debian: /opt/zigbee2mqtt/data/configuration.yaml | alpine: /var/lib/zigbee2mqtt/configuration.yaml",
|
||||
"description": "Zigbee2MQTT is an open-source software project that allows you to use Zigbee-based smart home devices (such as those sold under the Philips Hue and Ikea Tradfri brands) with MQTT-based home automation systems, like Home Assistant, Node-RED, and others. The software acts as a bridge between your Zigbee devices and MQTT, allowing you to control and monitor these devices from your home automation system.",
|
||||
"install_methods": [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user