Files
ProxmoxVE/install/gokapi-install.sh
krazos 30351670b7 Fix: Update gokapi binary name for v2.2.4+ and add migration step (#13377)
* Rename gokapi binary and update service

Change the installed binary name from pre-v2.2.4 `gokapi-linux_amd64` to v2.2.4+ `gokapi` and update service configuration accordingly. Add a migration step to remove any legacy `gokapi-linux_amd64` binary file, update binary reference in existing `gokapi.service`, and reload systemd before starting the service.

* Update comment for binary name migration

---------

Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2026-03-28 23:26:51 +01:00

43 lines
930 B
Bash

#!/usr/bin/env bash
# Copyright (c) 2021-2026 tteck
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/Forceu/Gokapi
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
fetch_and_deploy_gh_release "gokapi" "Forceu/Gokapi" "prebuild" "latest" "/opt/gokapi" "*linux*amd64.zip"
msg_info "Configuring Gokapi"
mkdir -p /opt/gokapi/{data,config}
chmod +x /opt/gokapi/gokapi
msg_ok "Configured Gokapi"
msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/gokapi.service
[Unit]
Description=gokapi
[Service]
Type=simple
Environment=GOKAPI_DATA_DIR=/opt/gokapi/data
Environment=GOKAPI_CONFIG_DIR=/opt/gokapi/config
ExecStart=/opt/gokapi/gokapi
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now gokapi
msg_ok "Created Service"
motd_ssh
customize
cleanup_lxc