diff options
author | crupest <crupest@outlook.com> | 2024-08-13 23:33:42 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2024-08-14 00:29:09 +0800 |
commit | ad5c3b81ecf44641673245e950761fea91f8bad3 (patch) | |
tree | bebf1970dc09b20df1000702d8d6cf77bcbc45c5 /docker/crupest-debian-dev/bootstrap/bash-profile/code-server.bash | |
parent | 467820bc366e46fd07651e0cb647b623b8f5ff56 (diff) | |
download | crupest-ad5c3b81ecf44641673245e950761fea91f8bad3.tar.gz crupest-ad5c3b81ecf44641673245e950761fea91f8bad3.tar.bz2 crupest-ad5c3b81ecf44641673245e950761fea91f8bad3.zip |
refactor(docker/debian-dev): rename debian-dev to crupest-debian-dev.
Diffstat (limited to 'docker/crupest-debian-dev/bootstrap/bash-profile/code-server.bash')
-rw-r--r-- | docker/crupest-debian-dev/bootstrap/bash-profile/code-server.bash | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/docker/crupest-debian-dev/bootstrap/bash-profile/code-server.bash b/docker/crupest-debian-dev/bootstrap/bash-profile/code-server.bash new file mode 100644 index 0000000..443eb0b --- /dev/null +++ b/docker/crupest-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 |