blob: 7dfc0e91a85f991b652cd5ca9bf3dbb9cea134c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#! /usr/bin/env bash
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 -x "$CODE_SERVER_PROGRAM" > /dev/null 2>&1; then
echo "code-server is not running, starting..."
"$CODE_SERVER_PROGRAM" "--bind-addr" "0.0.0.0:$CODE_SERVER_PORT"
else
echo "code-server is already running."
fi
else
echo "code-server not found, skipping code-server setup." >&2
exit 1
fi
|