|
| 1 | +#!/usr/bin/env bash |
| 2 | +_CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" |
| 3 | +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" |
| 4 | +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") |
| 5 | +# Copyright (c) 2021-2026 community-scripts ORG |
| 6 | +# Author: MickLesk (CanbiZ) |
| 7 | +# License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE |
| 8 | +# Source: https://github.com/stumpapp/stump |
| 9 | + |
| 10 | +APP="Stump" |
| 11 | +var_tags="${var_tags:-comics;manga;ebook}" |
| 12 | +var_cpu="${var_cpu:-2}" |
| 13 | +var_ram="${var_ram:-1024}" |
| 14 | +var_disk="${var_disk:-8}" |
| 15 | +var_os="${var_os:-debian}" |
| 16 | +var_version="${var_version:-13}" |
| 17 | +var_arm64="${var_arm64:-no}" # upstream releases ship a Linux x86_64 server only |
| 18 | +var_unprivileged="${var_unprivileged:-1}" |
| 19 | + |
| 20 | +header_info "$APP" |
| 21 | +variables |
| 22 | +color |
| 23 | +catch_errors |
| 24 | + |
| 25 | +function update_script() { |
| 26 | + header_info |
| 27 | + check_container_storage |
| 28 | + check_container_resources |
| 29 | + |
| 30 | + if [[ ! -d /opt/stump ]]; then |
| 31 | + msg_error "No ${APP} Installation Found!" |
| 32 | + exit |
| 33 | + fi |
| 34 | + |
| 35 | + if check_for_gh_release "stump" "stumpapp/stump"; then |
| 36 | + msg_info "Stopping Stump" |
| 37 | + systemctl stop stump |
| 38 | + msg_ok "Stopped Stump" |
| 39 | + |
| 40 | + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "stump" "stumpapp/stump" "prebuild" "latest" "/opt/stump" "linux-build-results.zip" |
| 41 | + chmod +x /opt/stump/stump_server |
| 42 | + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "pdfium" "bblanchon/pdfium-binaries" "prebuild" "latest" "/opt/pdfium" "pdfium-linux-x64.tgz" |
| 43 | + |
| 44 | + msg_info "Starting Stump" |
| 45 | + systemctl start stump |
| 46 | + msg_ok "Started Stump" |
| 47 | + msg_ok "Updated successfully!" |
| 48 | + fi |
| 49 | + exit |
| 50 | +} |
| 51 | + |
| 52 | +start |
| 53 | +build_container |
| 54 | +description |
| 55 | + |
| 56 | +msg_ok "Completed Successfully!\n" |
| 57 | +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" |
| 58 | +echo -e "${INFO}${YW}Access it using the following URL:${CL}" |
| 59 | +echo -e "${GATEWAY}${BGN}http://${IP}:10801${CL}" |
0 commit comments