mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-06-30 19:24:57 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d8b0610d6 | |||
| c7b7bbcd7b |
@@ -0,0 +1,64 @@
|
||||
#!/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
|
||||
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}"
|
||||
@@ -0,0 +1,6 @@
|
||||
________ _______ _____
|
||||
/ ____/ |/ / __ \ / ___/___ ______ _____ _____
|
||||
/ /_ / /|_/ / / / /_____\__ \/ _ \/ ___/ | / / _ \/ ___/
|
||||
/ __/ / / / / /_/ /_____/__/ / __/ / | |/ / __/ /
|
||||
/_/ /_/ /_/_____/ /____/\___/_/ |___/\___/_/
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user