From 209e003c7f65055ff18f7a3662e56b00a59efc42 Mon Sep 17 00:00:00 2001 From: "push-app-to-main[bot]" <203845782+push-app-to-main[bot]@users.noreply.github.com> Date: Tue, 8 Sep 2026 11:18:20 +0200 Subject: [PATCH] Stash (#17106) * Add stash (ct) * Change default value of var_arm64 to 'yes' --------- Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com> Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com> --- ct/headers/stash | 6 +++++ ct/stash.sh | 58 ++++++++++++++++++++++++++++++++++++++++ install/stash-install.sh | 46 +++++++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 ct/headers/stash create mode 100644 ct/stash.sh create mode 100644 install/stash-install.sh diff --git a/ct/headers/stash b/ct/headers/stash new file mode 100644 index 000000000..f16a4980f --- /dev/null +++ b/ct/headers/stash @@ -0,0 +1,6 @@ + _____ __ __ + / ___// /_____ ______/ /_ + \__ \/ __/ __ `/ ___/ __ \ + ___/ / /_/ /_/ (__ ) / / / +/____/\__/\__,_/____/_/ /_/ + diff --git a/ct/stash.sh b/ct/stash.sh new file mode 100644 index 000000000..829130707 --- /dev/null +++ b/ct/stash.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main" +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/stashapp/stash + +APP="Stash" +var_tags="${var_tags:-media;organizer}" +var_cpu="${var_cpu:-2}" +var_ram="${var_ram:-2048}" +var_disk="${var_disk:-8}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_gpu="${var_gpu:-yes}" +var_arm64="${var_arm64:-yes}" +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/stash ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "stash" "stashapp/stash"; then + msg_info "Stopping Service" + systemctl stop stash + msg_ok "Stopped Service" + + fetch_and_deploy_gh_release "stash" "stashapp/stash" "singlefile" "latest" "/opt/stash" "$(arch_resolve stash-linux stash-linux-arm64v8)" + + msg_info "Starting Service" + systemctl start stash + msg_ok "Started Service" + 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 "${GATEWAY}${BGN}http://${IP}:9999${CL}" diff --git a/install/stash-install.sh b/install/stash-install.sh new file mode 100644 index 000000000..a1ee90d4a --- /dev/null +++ b/install/stash-install.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/stashapp/stash + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +setup_ffmpeg +setup_hwaccel + +fetch_and_deploy_gh_release "stash" "stashapp/stash" "singlefile" "latest" "/opt/stash" "$(arch_resolve stash-linux stash-linux-arm64v8)" + +msg_info "Creating Service" +mkdir -p /opt/stash_data +cat </etc/systemd/system/stash.service +[Unit] +Description=Stash +Wants=network-online.target +After=network-online.target + +[Service] +Type=simple +User=root +WorkingDirectory=/opt/stash +Environment=STASH_CONFIG_FILE=/opt/stash_data/config.yml +ExecStart=/opt/stash/stash +Restart=on-failure +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now stash +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc