-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathexec-v2
More file actions
executable file
·30 lines (28 loc) · 794 Bytes
/
exec-v2
File metadata and controls
executable file
·30 lines (28 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/dumb-init /bin/sh
# Special exec script to handle user cases that needs auth or
# stuff I can think of.
# check for $CODER_ENABLE_AUTH.
case "${CODER_ENABLE_AUTH}" in
true)
case "${CODER_ENABLE_TLS}" in
true)
PASSWORD="${CODER_PASSWORD}" \
/usr/bin/code-server --port=9000 --cert=/home/coder/certs/cert.crt --cert-key=/home/coder/certs/cert.key
;;
*)
PASSWORD="${CODER_PASSWORD}" \
/usr/bin/code-server --port=9000
;;
esac
;;
*)
case "${CODER_ENABLE_TLS}" in
true)
/usr/bin/code-server --port=9000 --cert=/home/coder/certs/cert.crt --cert-key=/home/coder/certs/cert.key --auth=none
;;
*)
/usr/bin/code-server --port=9000 --auth=none
;;
esac
;;
esac