Files
ProxmoxVE/ct/spoolman.sh
T

68 lines
2.0 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
_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 tteck
# Author: MickLesk (Canbiz)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Donkie/Spoolman
2024-06-13 13:38:29 +02:00
APP="Spoolman"
var_tags="${var_tags:-3d-printing}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
2025-10-15 22:58:08 +02:00
var_version="${var_version:-13}"
2026-06-12 00:16:15 +10:00
var_arm64="${var_arm64:-yes}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
2024-06-13 13:38:29 +02:00
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/spoolman ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
2024-06-13 13:38:29 +02:00
2025-12-13 11:30:06 +01:00
if check_for_gh_release "spoolman" "Donkie/Spoolman"; then
2025-10-10 11:15:44 +02:00
msg_info "Stopping Service"
systemctl stop spoolman
2025-10-10 11:15:44 +02:00
msg_ok "Stopped Service"
2024-06-13 13:38:29 +02:00
create_backup /opt/spoolman/.env
2025-12-13 11:30:06 +01:00
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "spoolman" "Donkie/Spoolman" "prebuild" "latest" "/opt/spoolman" "spoolman.zip"
PYTHON_VERSION="3.14" UV_PROJECT_DIR="/opt/spoolman" setup_uv
restore_backup
2025-12-13 11:30:06 +01:00
msg_info "Updating Spoolman"
cd /opt/spoolman
2026-01-24 10:29:46 -05:00
$STD uv sync --locked --no-install-project
$STD uv sync --locked
sed -i 's|^ExecStart=.*|ExecStart=/usr/bin/bash /opt/spoolman/scripts/start.sh|' /etc/systemd/system/spoolman.service
2025-12-13 11:30:06 +01:00
msg_ok "Updated Spoolman"
2024-06-13 13:38:29 +02:00
2025-10-10 11:15:44 +02:00
msg_info "Starting Service"
systemctl start spoolman
2025-10-10 11:15:44 +02:00
msg_ok "Started Service"
msg_ok "Updated successfully!"
fi
exit
2024-06-13 13:38:29 +02:00
}
start
build_container
description
2026-01-06 22:57:40 +01:00
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}:7912${CL}"