1
0
forked from Proxmox/ProxmoxVE

Add fmd-server (ct)

This commit is contained in:
push-app-to-main[bot]
2026-06-29 18:48:25 +00:00
parent a84e13b504
commit c7b7bbcd7b
3 changed files with 119 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://gitlab.com/fmd-foss/fmd-server
APP="FMD-Server"
var_tags="${var_tags:-FMD}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-512}"
var_disk="${var_disk:-4}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
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/fmd-server ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gl_release "fmd-server" "fmd-foss/fmd-server"; then
msg_info "Stopping Service"
systemctl stop fmd-server
msg_ok "Stopped Service"
create_backup /opt/fmd-server/config.yml /opt/fmd-server/db
CLEAN_INSTALL=1 fetch_and_deploy_gl_release "fmd-server" "fmd-foss/fmd-server" "prebuild" "latest" "/opt/fmd-server" "fmd-server-*.zip"
msg_info "Configuring FMD-Server"
cd /opt/fmd-server
chmod +x fmd-server-*
msg_ok "Configured FMD-Server"
restore_backup
msg_info "Starting Service"
systemctl start fmd-server
msg_ok "Started Service"
msg_ok "Updated successfully!"
fi
cleanup_lxc
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 "${TAB}${GATEWAY}${BGN}https://${IP}:8443${CL}"
+6
View File
@@ -0,0 +1,6 @@
________ _______ _____
/ ____/ |/ / __ \ / ___/___ ______ _____ _____
/ /_ / /|_/ / / / /_____\__ \/ _ \/ ___/ | / / _ \/ ___/
/ __/ / / / / /_/ /_____/__/ / __/ / | |/ / __/ /
/_/ /_/ /_/_____/ /____/\___/_/ |___/\___/_/
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2026 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://gitlab.com/fmd-foss/fmd-server
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
fetch_and_deploy_gl_release "fmd-server" "fmd-foss/fmd-server" "prebuild" "latest" "/opt/fmd-server" "fmd-server-*.zip"
create_self_signed_cert
msg_info "Configuring fmd-server"
cd /opt/fmd-server
chmod +x fmd-server-*
cp config.example.yml config.yml
edit_yaml_config config.yml "WebDir" '"/opt/fmd-server/web/dist/"'
edit_yaml_config config.yml "DatabaseDir" '"/opt/fmd-server/db/"'
edit_yaml_config config.yml "ServerCrt" '"/etc/ssl/fmd-server/fmd-server.crt"'
edit_yaml_config config.yml "ServerKey" '"/etc/ssl/fmd-server/fmd-server.key"'
msg_ok "Configured fmd-server"
msg_info "Creating services"
cat <<EOF >/etc/systemd/system/fmd-server.service
[Unit]
Description=fmd-server Service
After=network.target
[Service]
WorkingDirectory=/opt/fmd-server
ExecStart=/opt/fmd-server/fmd-server-$(arch_resolve) serve
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now fmd-server
msg_ok "Created services"
motd_ssh
customize
cleanup_lxc