From 8fe3578e17757a50f8285a2759c6b149fe85a0b0 Mon Sep 17 00:00:00 2001 From: crupest Date: Tue, 13 Aug 2024 22:45:45 +0800 Subject: feat(docker/debian-dev): remove code-server and merge it to debian-dev. --- .../bootstrap/bash-profile/auto-start-apt-cacher.bash | 2 -- docker/debian-dev/bootstrap/bash-profile/code-server.bash | 12 ++++++++++++ docker/debian-dev/bootstrap/bash-profile/dev.bash | 1 - 3 files changed, 12 insertions(+), 3 deletions(-) delete mode 100644 docker/debian-dev/bootstrap/bash-profile/auto-start-apt-cacher.bash create mode 100644 docker/debian-dev/bootstrap/bash-profile/code-server.bash delete mode 100644 docker/debian-dev/bootstrap/bash-profile/dev.bash (limited to 'docker/debian-dev/bootstrap/bash-profile') diff --git a/docker/debian-dev/bootstrap/bash-profile/auto-start-apt-cacher.bash b/docker/debian-dev/bootstrap/bash-profile/auto-start-apt-cacher.bash deleted file mode 100644 index f230cb1..0000000 --- a/docker/debian-dev/bootstrap/bash-profile/auto-start-apt-cacher.bash +++ /dev/null @@ -1,2 +0,0 @@ -echo "Start apt-cacher-ng if it does not start..." -pgrep apt-cacher-ng || apt-cacher-ng diff --git a/docker/debian-dev/bootstrap/bash-profile/code-server.bash b/docker/debian-dev/bootstrap/bash-profile/code-server.bash new file mode 100644 index 0000000..443eb0b --- /dev/null +++ b/docker/debian-dev/bootstrap/bash-profile/code-server.bash @@ -0,0 +1,12 @@ +export CODE_SERVER_CONFIG="/data/code-server-config.yaml" + +CODE_SERVER_PROGRAM=code-server +CODE_SERVER_PORT=8080 + +if which "$CODE_SERVER_PROGRAM" > /dev/null 2>&1; then + if ! pgrep -f "$CODE_SERVER_PROGRAM" > /dev/null 2>&1; then + mkdir -p ~/.local/share/code-server + nohup "$CODE_SERVER_PROGRAM" "--bind-addr", "0.0.0.0:$CODE_SERVER_PORT" \ + > ~/.local/share/code-server/log 2> ~/.local/share/code-server/error & + fi +fi diff --git a/docker/debian-dev/bootstrap/bash-profile/dev.bash b/docker/debian-dev/bootstrap/bash-profile/dev.bash deleted file mode 100644 index c49dc35..0000000 --- a/docker/debian-dev/bootstrap/bash-profile/dev.bash +++ /dev/null @@ -1 +0,0 @@ -alias cp-no-git="rsync -a --exclude='**/.git'" -- cgit v1.2.3