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
# Author: MickLesk (CanbiZ)
# 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"
var_tags="${var_tags:-photos}"

View File

@@ -32,7 +32,7 @@ function update_script() {
if check_for_gh_release "OxiCloud" "DioCrafts/OxiCloud"; then
msg_info "Stopping OxiCloud"
$STD systemctl stop oxicloud
systemctl stop oxicloud
msg_ok "Stopped 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
msg_info "Updating OxiCloud"
PG_DB_PASS="$(sed -n '/Password:/s/[^:]*:[[:space:]]//p' ~/oxicloud.creds)"
source /etc/oxicloud/.env
cd /opt/oxicloud
export DATABASE_URL="postgres://oxicloud:${PG_DB_PASS}@localhost/oxicloud"
export DATABASE_URL
export RUSTFLAGS="-C target-cpu=native"
$STD cargo build --release
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 "${INFO}${YW} Create an admin account with:${CL}"
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"
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"
systemctl stop snowflake-proxy
msg_ok "Stopped Service"
@@ -41,12 +41,12 @@ function update_script() {
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 tar -xzf /opt/snowflake.tar.gz -C /opt
$STD rm -rf /opt/snowflake.tar.gz
$STD rm -rf /opt/tor-snowflake
$STD mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake
$STD chown -R snowflake:snowflake /opt/tor-snowflake
$STD sudo -H -u snowflake bash -c "cd /opt/tor-snowflake/proxy && go build -o snowflake-proxy ."
tar -xzf /opt/snowflake.tar.gz -C /opt
rm -rf /opt/snowflake.tar.gz
rm -rf /opt/tor-snowflake
mv /opt/snowflake-v${RELEASE} /opt/tor-snowflake
cd /opt/tor-snowflake/proxy
$STD go build -o snowflake-proxy .
echo "${RELEASE}" >~/.tor-snowflake
msg_ok "Updated Snowflake to v${RELEASE}"