Refactor multiple scripts: fix garmin-grafana unbound var, remove creds files, fix tor-snowflake user/sudo, fix ente source URL, fix oxicloud env sourcing, fix pixelfed creds footer

This commit is contained in:
CanbiZ (MickLesk)
2026-03-27 14:32:27 +01:00
parent 682d8b566a
commit 60965428ab
9 changed files with 18 additions and 48 deletions

View File

@@ -4,7 +4,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
# Copyright (c) 2021-2026 community-scripts ORG # Copyright (c) 2021-2026 community-scripts ORG
# Author: MickLesk (CanbiZ) # Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
# Source: https://www.debian.org/ # Source: https://github.com/ente-io/ente
APP="Ente" APP="Ente"
var_tags="${var_tags:-photos}" var_tags="${var_tags:-photos}"

View File

@@ -32,7 +32,7 @@ function update_script() {
if check_for_gh_release "OxiCloud" "DioCrafts/OxiCloud"; then if check_for_gh_release "OxiCloud" "DioCrafts/OxiCloud"; then
msg_info "Stopping OxiCloud" msg_info "Stopping OxiCloud"
$STD systemctl stop oxicloud systemctl stop oxicloud
msg_ok "Stopped OxiCloud" msg_ok "Stopped OxiCloud"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "OxiCloud" "DioCrafts/OxiCloud" "tarball" "latest" "/opt/oxicloud" CLEAN_INSTALL=1 fetch_and_deploy_gh_release "OxiCloud" "DioCrafts/OxiCloud" "tarball" "latest" "/opt/oxicloud"
@@ -40,9 +40,9 @@ function update_script() {
RUST_TOOLCHAIN=$TOOLCHAIN setup_rust RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
msg_info "Updating OxiCloud" msg_info "Updating OxiCloud"
PG_DB_PASS="$(sed -n '/Password:/s/[^:]*:[[:space:]]//p' ~/oxicloud.creds)" source /etc/oxicloud/.env
cd /opt/oxicloud cd /opt/oxicloud
export DATABASE_URL="postgres://oxicloud:${PG_DB_PASS}@localhost/oxicloud" export DATABASE_URL
export RUSTFLAGS="-C target-cpu=native" export RUSTFLAGS="-C target-cpu=native"
$STD cargo build --release $STD cargo build --release
mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud mv target/release/oxicloud /usr/bin/oxicloud && chmod +x /usr/bin/oxicloud

View File

@@ -77,5 +77,3 @@ echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"
echo -e "${INFO}${YW} Create an admin account with:${CL}" echo -e "${INFO}${YW} Create an admin account with:${CL}"
echo -e "${TAB}cd /opt/pixelfed && sudo -u pixelfed php artisan user:create" echo -e "${TAB}cd /opt/pixelfed && sudo -u pixelfed php artisan user:create"
echo -e "${INFO}${YW} Credentials saved in:${CL}"
echo -e "${TAB}/root/pixelfed.creds"

View File

@@ -32,7 +32,7 @@ function update_script() {
msg_ok "Updated Container OS" msg_ok "Updated Container OS"
RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//')
if [[ ! -f "~/.tor-snowflake" ]] || [[ "${RELEASE}" != "$(cat "~/.tor-snowflake")" ]]; then if [[ ! -f ~/.tor-snowflake ]] || [[ "${RELEASE}" != "$(cat ~/.tor-snowflake)" ]]; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop snowflake-proxy systemctl stop snowflake-proxy
msg_ok "Stopped Service" msg_ok "Stopped Service"
@@ -41,12 +41,12 @@ function update_script() {
msg_info "Updating Snowflake" msg_info "Updating Snowflake"
$STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o /opt/snowflake.tar.gz $STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o /opt/snowflake.tar.gz
$STD tar -xzf /opt/snowflake.tar.gz -C /opt tar -xzf /opt/snowflake.tar.gz -C /opt
$STD rm -rf /opt/snowflake.tar.gz rm -rf /opt/snowflake.tar.gz
$STD rm -rf /opt/tor-snowflake rm -rf /opt/tor-snowflake
$STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake
$STD chown -R snowflake:snowflake /opt/tor-snowflake cd /opt/tor-snowflake/proxy
$STD sudo -H -u snowflake bash -c "cd /opt/tor-snowflake/proxy && go build -o snowflake-proxy ." $STD go build -o snowflake-proxy .
echo "${RELEASE}" >~/.tor-snowflake echo "${RELEASE}" >~/.tor-snowflake
msg_ok "Updated Snowflake to v${RELEASE}" msg_ok "Updated Snowflake to v${RELEASE}"

View File

@@ -51,28 +51,6 @@ endpoint:
EOF EOF
msg_ok "Configured Ente CLI" msg_ok "Configured Ente CLI"
msg_info "Saving Ente Credentials"
{
echo "Important Configuration Notes:"
echo "- Frontend is built with IP: $LOCAL_IP"
echo "- If IP changes, run: /opt/ente/rebuild-frontend.sh"
echo "- Museum API: http://$LOCAL_IP:8080"
echo "- Photos UI: http://$LOCAL_IP:3000"
echo "- Accounts UI: http://$LOCAL_IP:3001"
echo "- Auth UI: http://$LOCAL_IP:3003"
echo ""
echo "Post-Installation Steps Required:"
echo "1. Create your first user account via the web UI"
echo "2. Check museum logs for email verification code:"
echo " journalctl -u ente-museum -n 100 | grep -i 'verification'"
echo "3. Use verification code to complete account setup"
echo "4. Remove subscription limit (replace <email> with your account):"
echo " ente admin update-subscription -a <email> -u <email> --no-limit"
echo ""
echo "Note: Email verification requires manual intervention since SMTP is not configured"
} >>~/ente.creds
msg_ok "Saved Ente Credentials"
msg_info "Building Museum (server)" msg_info "Building Museum (server)"
cd /opt/ente/server cd /opt/ente/server
$STD corepack enable $STD corepack enable

View File

@@ -27,7 +27,7 @@ msg_ok "Installed InfluxDB"
msg_info "Installing Chronograf" msg_info "Installing Chronograf"
CHRONOGRAF_VERSION=$(get_latest_github_release "influxdata/chronograf") CHRONOGRAF_VERSION=$(get_latest_github_release "influxdata/chronograf")
fetch_and_deploy_from_url "https://dl.influxdata.com/chronograf/releases/chronograf_${CHRONOGRAF_VERSION}_amd64.deb" fetch_and_deploy_from_url "https://dl.influxdata.com/chronograf/releases/chronograf_${CHRONOGRAF_VERSION}_amd64.deb" ""
msg_ok "Installed Chronograf" msg_ok "Installed Chronograf"
msg_info "Configuring InfluxDB" msg_info "Configuring InfluxDB"

View File

@@ -64,7 +64,7 @@ StandardError=journal
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
EOF EOF
$STD systemctl enable -q --now oxicloud systemctl enable -q --now oxicloud
msg_ok "Created OxiCloud Service" msg_ok "Created OxiCloud Service"
motd_ssh motd_ssh

View File

@@ -15,18 +15,14 @@ update_os
setup_go setup_go
msg_info "Creating snowflake user"
useradd -m -r -s /usr/sbin/nologin -d /home/snowflake snowflake
msg_ok "Created snowflake user"
msg_info "Building Snowflake" msg_info "Building Snowflake"
RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//') RELEASE=$(curl -fsSL https://gitlab.torproject.org/api/v4/projects/tpo%2Fanti-censorship%2Fpluggable-transports%2Fsnowflake/releases | jq -r '.[0].tag_name' | sed 's/^v//')
$STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o /opt/snowflake.tar.gz $STD curl -fsSL "https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake/-/archive/v${RELEASE}/snowflake-v${RELEASE}.tar.gz" -o /opt/snowflake.tar.gz
$STD tar -xzf /opt/snowflake.tar.gz -C /opt $STD tar -xzf /opt/snowflake.tar.gz -C /opt
$STD rm -rf /opt/snowflake.tar.gz rm -rf /opt/snowflake.tar.gz
$STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake
$STD chown -R snowflake:snowflake /opt/tor-snowflake cd /opt/tor-snowflake/proxy
$STD sudo -H -u snowflake bash -c "cd /opt/tor-snowflake/proxy && go build -o snowflake-proxy ." $STD go build -o snowflake-proxy .
echo "${RELEASE}" >~/.tor-snowflake echo "${RELEASE}" >~/.tor-snowflake
msg_ok "Built Snowflake Proxy v${RELEASE}" msg_ok "Built Snowflake Proxy v${RELEASE}"
@@ -40,8 +36,6 @@ Wants=network-online.target
[Service] [Service]
Type=simple Type=simple
User=snowflake
Group=snowflake
WorkingDirectory=/opt/tor-snowflake/proxy WorkingDirectory=/opt/tor-snowflake/proxy
ExecStart=/opt/tor-snowflake/proxy/snowflake-proxy -verbose -unsafe-logging ExecStart=/opt/tor-snowflake/proxy/snowflake-proxy -verbose -unsafe-logging
Restart=always Restart=always

View File

@@ -37,7 +37,7 @@
"type": "warning" "type": "warning"
}, },
{ {
"text": "Credentials saved in /root/pixelfed.creds", "text": "Credentials are stored in /opt/pixelfed/.env",
"type": "info" "type": "info"
}, },
{ {