2025-11-02 23:49:54 -08:00
|
|
|
#!/usr/bin/env bash
|
2025-04-01 10:25:46 +02:00
|
|
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
2026-01-06 13:28:12 +01:00
|
|
|
# Copyright (c) 2021-2026 community-scripts ORG
|
2025-01-21 09:02:57 +01:00
|
|
|
# Author: bvdberg01
|
|
|
|
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
2026-02-24 15:11:53 +01:00
|
|
|
# Source: https://www.projectsend.org/ | Github: https://github.com/projectsend/projectsend
|
2025-01-21 09:02:57 +01:00
|
|
|
|
|
|
|
|
APP="ProjectSend"
|
2025-04-10 11:56:52 +02:00
|
|
|
var_tags="${var_tags:-media}"
|
|
|
|
|
var_cpu="${var_cpu:-1}"
|
|
|
|
|
var_ram="${var_ram:-1024}"
|
|
|
|
|
var_disk="${var_disk:-8}"
|
|
|
|
|
var_os="${var_os:-debian}"
|
2025-10-15 22:39:16 +02:00
|
|
|
var_version="${var_version:-13}"
|
2026-06-22 04:44:06 +10:00
|
|
|
var_arm64="${var_arm64:-yes}"
|
2025-04-10 11:56:52 +02:00
|
|
|
var_unprivileged="${var_unprivileged:-1}"
|
2025-01-21 09:02:57 +01:00
|
|
|
|
|
|
|
|
header_info "$APP"
|
|
|
|
|
variables
|
|
|
|
|
color
|
|
|
|
|
catch_errors
|
|
|
|
|
|
|
|
|
|
function update_script() {
|
|
|
|
|
header_info
|
|
|
|
|
check_container_storage
|
|
|
|
|
check_container_resources
|
|
|
|
|
if [[ ! -d /opt/projectsend ]]; then
|
|
|
|
|
msg_error "No ${APP} Installation Found!"
|
|
|
|
|
exit
|
|
|
|
|
fi
|
2026-08-14 22:11:45 +02:00
|
|
|
|
|
|
|
|
if [[ -f /opt/projectsend/includes/sys.config.php ]]; then
|
|
|
|
|
msg_error "This container runs ProjectSend Legacy (pre-2.0)."
|
|
|
|
|
msg_error "2.0 is a new application, not an update - there is no in-place upgrade."
|
|
|
|
|
msg_error "Set up a fresh ProjectSend container and use projectsend/v1-migration-tool to bring your data across."
|
|
|
|
|
exit
|
|
|
|
|
fi
|
2025-10-21 21:50:26 +02:00
|
|
|
|
|
|
|
|
if check_for_gh_release "projectsend" "projectsend/projectsend"; then
|
2026-08-14 22:11:45 +02:00
|
|
|
msg_info "Stopping Services"
|
|
|
|
|
systemctl stop nginx projectsend-worker
|
|
|
|
|
msg_ok "Stopped Services"
|
|
|
|
|
|
|
|
|
|
create_backup /opt/projectsend/.env /opt/projectsend/storage/app/files
|
|
|
|
|
|
|
|
|
|
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "projectsend" "projectsend/projectsend" "prebuild" "latest" "/opt/projectsend"
|
2025-01-21 09:02:57 +01:00
|
|
|
|
2026-08-14 22:11:45 +02:00
|
|
|
restore_backup
|
2025-10-21 21:50:26 +02:00
|
|
|
|
2026-08-14 22:11:45 +02:00
|
|
|
msg_info "Updating ProjectSend"
|
|
|
|
|
cd /opt/projectsend
|
2025-01-21 09:02:57 +01:00
|
|
|
chown -R www-data:www-data /opt/projectsend
|
2026-08-14 22:11:45 +02:00
|
|
|
chmod -R 775 /opt/projectsend/storage /opt/projectsend/bootstrap/cache
|
|
|
|
|
$STD sudo -u www-data php artisan migrate --force
|
|
|
|
|
$STD sudo -u www-data php artisan projectsend:ensure-roles
|
|
|
|
|
$STD sudo -u www-data php artisan optimize:clear
|
|
|
|
|
msg_ok "Updated ProjectSend"
|
2025-01-21 09:02:57 +01:00
|
|
|
|
2026-08-14 22:11:45 +02:00
|
|
|
msg_info "Starting Services"
|
|
|
|
|
systemctl start nginx projectsend-worker
|
|
|
|
|
msg_ok "Started Services"
|
2025-10-30 09:24:16 -07:00
|
|
|
msg_ok "Updated successfully!"
|
2025-01-21 09:02:57 +01:00
|
|
|
fi
|
|
|
|
|
exit
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
start
|
|
|
|
|
build_container
|
|
|
|
|
description
|
|
|
|
|
|
2026-01-06 22:57:40 +01:00
|
|
|
msg_ok "Completed successfully!\n"
|
2025-01-21 09:02:57 +01:00
|
|
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
2026-06-03 11:03:13 +02:00
|
|
|
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
|
2026-08-14 22:11:45 +02:00
|
|
|
echo -e "${GATEWAY}${BGN}http://${IP}${CL}"
|
|
|
|
|
echo -e "${INFO}${YW}Admin credentials saved to ~/projectsend.creds${CL}"
|