Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
22 changes: 0 additions & 22 deletions compose/video-worker.yml

This file was deleted.

4 changes: 2 additions & 2 deletions compose/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
restart: always
environment:
TZ: ${TZ:-Asia/Shanghai}
HTTP_PORT: ${HTTP_PORT:-80}
HTTP_PORT: 80
USE_LB: ${USE_LB:-1}
USE_IPV6: ${USE_IPV6:-0}
USE_XPACK: ${USE_XPACK:-0}
Expand All @@ -22,7 +22,7 @@ services:
RAZOR_ENABLED: ${RAZOR_ENABLED:-1}
FACELIVE_ENABLED: ${FACELIVE_ENABLED:-0}
ports:
- ${HTTP_PORT:-80}:${HTTP_PORT:-80}
- ${HTTP_PORT:-80}:80
volumes:
- ${VOLUME_DIR}/core/data:/opt/jumpserver/data
- ${VOLUME_DIR}/nginx/data/logs:/var/log/nginx
Expand Down
12 changes: 12 additions & 0 deletions jmsctl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ function service_to_docker_name() {
EXE=""

function start() {
target="/opt/jumpserver/installer"
if [[ -L "${target}" ]]; then
rm -f "${target}"
fi
if [[ ! -e "${target}" ]]; then
ln -s "${PROJECT_DIR}" "${target}" || echo ""
fi
${EXE} up -d
}

Expand Down Expand Up @@ -114,6 +121,11 @@ function restart() {
start
}

function clean() {
rm -f scripts/docker/*
rm -f scripts/images/*
}

function check_update() {
current_version=$(get_current_version)
latest_version=$(get_latest_version)
Expand Down
9 changes: 6 additions & 3 deletions scripts/0_prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ function prepare_image_files() {
echo "$(gettext 'Docker is not running, please install and start') ..."
exit 1
fi

if [[ ! -d "${IMAGE_DIR}" ]]; then
mkdir -p "${IMAGE_DIR}"
fi
rm -f "${IMAGE_DIR}/*"

pull_images

images=$(get_images)
Expand All @@ -78,9 +84,6 @@ function prepare_image_files() {
saved_id=$(cat "${md5_path}")
fi

if [[ ! -d "${IMAGE_DIR}" ]]; then
mkdir -p "${IMAGE_DIR}"
fi

if [[ -f "${image_path}" ]]; then
if [[ "${image_id}" != "${saved_id}" ]]; then
Expand Down
13 changes: 1 addition & 12 deletions scripts/1_config_jumpserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,8 @@ function set_service() {
fi
}

function init_db() {
echo_yellow "\n6. $(gettext 'Init JumpServer Database')"
if ! perform_db_migrations; then
log_error "$(gettext 'Failed to change the table structure')!"
exit 1
fi
}

function set_others() {
echo_yellow "\n7. $(gettext 'Configure Others')"
echo_yellow "\n6. $(gettext 'Configure Others')"
lang=$(get_config LANGUAGE_CODE "zh")
read_from_input lang "$(gettext 'Please enter language')" "zh/en/ja/es/ko/ru/vi" "${lang}"
set_config LANGUAGE_CODE "${lang}"
Expand Down Expand Up @@ -269,9 +261,6 @@ function main() {
if set_others; then
echo_done
fi
if init_db; then
echo_done
fi
}

if [[ "$0" == "${BASH_SOURCE[0]}" ]]; then
Expand Down
14 changes: 12 additions & 2 deletions scripts/4_install_jumpserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ function pre_install() {
if [[ -n "$UNCHECK_DEPENDENCIES" ]]; then
return 0
fi

if ! command -v systemctl &>/dev/null; then
docker version &>/dev/null || {
log_error "$(gettext 'The current Linux system does not support systemd management. Please deploy docker by yourself before running this script again')"
Expand All @@ -19,6 +20,7 @@ function pre_install() {
exit 1
}
fi

if ! command -v iptables &>/dev/null; then
log_error "$(gettext 'command not found, Please install it first') iptables"
exit 1
Expand Down Expand Up @@ -93,14 +95,22 @@ function main() {
exit 1
fi

echo_green "\n>>> $(gettext 'Install and Configure JumpServer')"
if ! bash "${BASE_DIR}/1_config_jumpserver.sh"; then
exit 1
fi

echo_green "\n>>> $(gettext 'Loading Docker Image')"
if ! bash "${BASE_DIR}/3_load_images.sh"; then
exit 1
fi
echo_green "\n>>> $(gettext 'Install and Configure JumpServer')"
if ! bash "${BASE_DIR}/1_config_jumpserver.sh"; then

echo_green "\n>>> $(gettext 'Initialize Database')"
if ! perform_db_migrations; then
log_error "$(gettext 'Failed to change the table structure')!"
exit 1
fi

installation_log "install"
post_install
}
Expand Down
7 changes: 7 additions & 0 deletions scripts/logo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

██╗██╗ ██╗███╗ ███╗██████╗ ███████╗███████╗██████╗ ██╗ ██╗███████╗██████╗
██║██║ ██║████╗ ████║██╔══██╗██╔════╝██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗
██║██║ ██║██╔████╔██║██████╔╝███████╗█████╗ ██████╔╝██║ ██║█████╗ ██████╔╝
██ ██║██║ ██║██║╚██╔╝██║██╔═══╝ ╚════██║██╔══╝ ██╔══██╗╚██╗ ██╔╝██╔══╝ ██╔══██╗
╚█████╔╝╚██████╔╝██║ ╚═╝ ██║██║ ███████║███████╗██║ ██║ ╚████╔╝ ███████╗██║ ██║
╚════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ ╚═══╝ ╚══════╝╚═╝ ╚═╝
Loading