commit
7d10077f82
65
ct/jumpserver.sh
Normal file
65
ct/jumpserver.sh
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: Nícolas Pastorello (opastorello)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/jumpserver/jumpserver
|
||||||
|
|
||||||
|
APP="JumpServer"
|
||||||
|
var_tags="bastion-host;pam"
|
||||||
|
var_cpu="2"
|
||||||
|
var_ram="8192"
|
||||||
|
var_disk="60"
|
||||||
|
var_os="debian"
|
||||||
|
var_version="12"
|
||||||
|
var_unprivileged="1"
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
check_container_storage
|
||||||
|
check_container_resources
|
||||||
|
|
||||||
|
if [[ ! -d /opt/jumpserver ]]; then
|
||||||
|
msg_error "No ${APP} Installation Found!"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
RELEASE=$(curl -fsSL https://api.github.com/repos/jumpserver/installer/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
|
||||||
|
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
|
||||||
|
msg_info "Updating ${APP} to ${RELEASE}"
|
||||||
|
if [[ -d /opt/jumpserver/config ]]; then
|
||||||
|
cp -r /opt/jumpserver/config /opt/jumpserver_config_backup
|
||||||
|
fi
|
||||||
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
|
rm -rf /opt/jumpserver
|
||||||
|
cd /opt
|
||||||
|
curl -fsSL "https://github.com/jumpserver/installer/releases/download/${RELEASE}/jumpserver-installer-${RELEASE}.tar.gz" -o jumpserver-installer-${RELEASE}.tar.gz
|
||||||
|
mkdir -p /opt/jumpserver
|
||||||
|
$STD tar -xzvf jumpserver-installer-${RELEASE}.tar.gz -C /opt/jumpserver --strip-components=1
|
||||||
|
if [[ -d /opt/jumpserver_config_backup ]]; then
|
||||||
|
cp -r /opt/jumpserver_config_backup /opt/jumpserver/config
|
||||||
|
rm -rf /opt/jumpserver_config_backup
|
||||||
|
fi
|
||||||
|
cd /opt/jumpserver
|
||||||
|
yes y | head -n 3 | $STD ./jmsctl.sh upgrade
|
||||||
|
$STD ./jmsctl.sh start
|
||||||
|
rm -rf /opt/jumpserver-installer-${RELEASE}.tar.gz
|
||||||
|
msg_ok "Updated Successfully"
|
||||||
|
else
|
||||||
|
msg_ok "No update required. ${APP} is already at ${RELEASE}."
|
||||||
|
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}http://${IP}${CL}"
|
34
frontend/public/json/jumpserver.json
Normal file
34
frontend/public/json/jumpserver.json
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{
|
||||||
|
"name": "JumpServer",
|
||||||
|
"slug": "jumpserver",
|
||||||
|
"categories": [
|
||||||
|
6
|
||||||
|
],
|
||||||
|
"date_created": "2025-04-08",
|
||||||
|
"type": "ct",
|
||||||
|
"updateable": true,
|
||||||
|
"privileged": false,
|
||||||
|
"interface_port": 80,
|
||||||
|
"documentation": "https://www.jumpserver.com/docs",
|
||||||
|
"website": "https://www.jumpserver.com/",
|
||||||
|
"logo": "https://raw.githubusercontent.com/jumpserver/jumpserver/refs/heads/dev/apps/static/img/logo.png",
|
||||||
|
"description": "JumpServer is an open-source Privileged Access Management (PAM) tool that provides DevOps and IT teams with on-demand and secure access to SSH, RDP, Kubernetes, Database and RemoteApp endpoints through a web browser.",
|
||||||
|
"install_methods": [
|
||||||
|
{
|
||||||
|
"type": "default",
|
||||||
|
"script": "ct/jumpserver.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 2,
|
||||||
|
"ram": 8192,
|
||||||
|
"hdd": 60,
|
||||||
|
"os": "debian",
|
||||||
|
"version": "12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"default_credentials": {
|
||||||
|
"username": "admin",
|
||||||
|
"password": "ChangeMe"
|
||||||
|
},
|
||||||
|
"notes": []
|
||||||
|
}
|
48
install/jumpserver-install.sh
Normal file
48
install/jumpserver-install.sh
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: Nícolas Pastorello (opastorello)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://github.com/jumpserver/jumpserver
|
||||||
|
|
||||||
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Installing Dependencies"
|
||||||
|
$STD apt-get install -y \
|
||||||
|
tar \
|
||||||
|
iptables
|
||||||
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
|
msg_info "Installing JumpServer"
|
||||||
|
cd /opt
|
||||||
|
RELEASE=$(curl -fsSL https://api.github.com/repos/jumpserver/installer/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
|
||||||
|
curl -fsSL "https://github.com/jumpserver/installer/releases/download/${RELEASE}/jumpserver-installer-${RELEASE}.tar.gz" -o jumpserver-installer-${RELEASE}.tar.gz
|
||||||
|
mkdir -p /opt/jumpserver
|
||||||
|
$STD tar -xzvf jumpserver-installer-${RELEASE}.tar.gz -C /opt/jumpserver --strip-components=1
|
||||||
|
cd /opt/jumpserver
|
||||||
|
$STD ./jmsctl.sh install <<EOF
|
||||||
|
n
|
||||||
|
n
|
||||||
|
n
|
||||||
|
redis
|
||||||
|
n
|
||||||
|
n
|
||||||
|
EOF
|
||||||
|
$STD ./jmsctl.sh start
|
||||||
|
echo "${RELEASE}" >/opt/${APP}_version.txt
|
||||||
|
msg_ok "Installed JumpServer"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
||||||
|
|
||||||
|
msg_info "Cleaning up"
|
||||||
|
rm -rf /opt/jumpserver-installer-${RELEASE}.tar.gz
|
||||||
|
$STD apt-get -y autoremove
|
||||||
|
$STD apt-get -y autoclean
|
||||||
|
msg_ok "Cleaned"
|
Loading…
x
Reference in New Issue
Block a user