File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -89,17 +89,25 @@ VERSION=$(curl -fsSL https://api.github.com/repos/coder/code-server/releases/lat
8989 awk ' {print substr($2, 3, length($2)-4) }' )
9090
9191msg_info " Installing Code-Server v${VERSION} "
92+
93+ if [ -f ~ /.config/code-server/config.yaml ]; then
94+ existing_config = true
95+ fi
96+
9297curl -fOL https://github.com/coder/code-server/releases/download/v" $VERSION " /code-server_" ${VERSION} " _amd64.deb & > /dev/null
9398dpkg -i code-server_" ${VERSION} " _amd64.deb & > /dev/null
9499rm -rf code-server_" ${VERSION} " _amd64.deb
95100mkdir -p ~ /.config/code-server/
96101systemctl enable -q --now code-server@" $USER "
102+
103+ if [ $existing_config = false ]; then
97104cat << EOF >~/.config/code-server/config.yaml
98105bind-addr: 0.0.0.0:8680
99106auth: none
100107password:
101108cert: false
102109EOF
110+ fi
103111systemctl restart code-server@" $USER "
104112msg_ok " Installed Code-Server v${VERSION} on $hostname "
105113
You can’t perform that action at this time.
0 commit comments