aboutsummaryrefslogtreecommitdiff
path: root/docker/crupest-debian-dev/bootstrap/bash-profile/code-server.bash
blob: 443eb0b23eecdc8eda8c430b07de00757a43e841 (plain)
1
2
3
4
5
6
7
8
9
10
11
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