mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-03-31 06:24:18 -04:00
Workflow: add push trigger for main branch on json/*.json and update the "Get JSON file for script" step to handle both workflow_dispatch and push events. The step now collects changed json/*.json files, validates each has a .slug with jq, ignores metadata/update-apps.json/versions.json, writes changed_app_jsons.txt, and sets a count output for downstream steps.
Installer & ct scripts: normalize indentation/formatting, ensure aliases.json and plugin-settings.json are initialized as {} and repos.json as [] when missing, and add missing trailing newlines. These changes improve robustness and shellcheck friendliness and make the workflow respond to direct pushes of app JSON files.
89 lines
2.0 KiB
Bash
89 lines
2.0 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
|
# Author: vhsdream
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
|
# Source: https://github.com/fccview/degoog
|
|
|
|
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 \
|
|
git \
|
|
unzip
|
|
msg_ok "Installed Dependencies"
|
|
|
|
msg_info "Installing Bun"
|
|
export BUN_INSTALL="/root/.bun"
|
|
curl -fsSL https://bun.sh/install | $STD bash
|
|
ln -sf /root/.bun/bin/bun /usr/local/bin/bun
|
|
ln -sf /root/.bun/bin/bunx /usr/local/bin/bunx
|
|
msg_ok "Installed Bun"
|
|
|
|
fetch_and_deploy_gh_release "degoog" "fccview/degoog" "prebuild" "latest" "/opt/degoog" "degoog_*_prebuild.tar.gz"
|
|
|
|
msg_info "Setting up degoog"
|
|
mkdir -p /opt/degoog/data/{engines,plugins,themes,store}
|
|
|
|
cat <<EOF >/opt/degoog/.env
|
|
DEGOOG_PORT=4444
|
|
DEGOOG_ENGINES_DIR=/opt/degoog/data/engines
|
|
DEGOOG_PLUGINS_DIR=/opt/degoog/data/plugins
|
|
DEGOOG_THEMES_DIR=/opt/degoog/data/themes
|
|
DEGOOG_ALIASES_FILE=/opt/degoog/data/aliases.json
|
|
DEGOOG_PLUGIN_SETTINGS_FILE=/opt/degoog/data/plugin-settings.json
|
|
# DEGOOG_SETTINGS_PASSWORDS=changeme
|
|
# DEGOOG_PUBLIC_INSTANCE=false
|
|
# LOGGER=debug
|
|
EOF
|
|
|
|
if [[ ! -f /opt/degoog/data/aliases.json ]]; then
|
|
cat <<EOF >/opt/degoog/data/aliases.json
|
|
{}
|
|
EOF
|
|
fi
|
|
|
|
if [[ ! -f /opt/degoog/data/plugin-settings.json ]]; then
|
|
cat <<EOF >/opt/degoog/data/plugin-settings.json
|
|
{}
|
|
EOF
|
|
fi
|
|
|
|
if [[ ! -f /opt/degoog/data/repos.json ]]; then
|
|
cat <<EOF >/opt/degoog/data/repos.json
|
|
[]
|
|
EOF
|
|
fi
|
|
msg_ok "Set up degoog"
|
|
|
|
msg_info "Creating Service"
|
|
cat <<EOF >/etc/systemd/system/degoog.service
|
|
[Unit]
|
|
Description=degoog
|
|
After=network.target
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=root
|
|
WorkingDirectory=/opt/degoog
|
|
EnvironmentFile=/opt/degoog/.env
|
|
ExecStart=/usr/local/bin/bun run src/server/index.ts
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
systemctl enable -q --now degoog
|
|
msg_ok "Created Service"
|
|
|
|
motd_ssh
|
|
customize
|
|
cleanup_lxc
|