Skip to content

Commit 8fa1743

Browse files
Code Server: Update misleading name, description and icon. (#4211)
* Update misleading name, description and icon. * Fix typo in frontend/public/json/coder-code-server.json Co-authored-by: Tobias <[email protected]> --------- Co-authored-by: Tobias <[email protected]>
1 parent 78bb1ee commit 8fa1743

File tree

3 files changed

+71
-68
lines changed

3 files changed

+71
-68
lines changed

frontend/public/json/code-server.json

-39
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "Coder Code Server",
3+
"slug": "coder-code-server",
4+
"categories": [
5+
1,
6+
20,
7+
11
8+
],
9+
"date_created": "2024-05-02",
10+
"type": "addon",
11+
"updateable": false,
12+
"privileged": false,
13+
"interface_port": 8680,
14+
"documentation": "https://coder.com/docs/code-server",
15+
"website": "https://coder.com/",
16+
"logo": "https://raw.githubusercontent.com/selfhst/icons/refs/heads/main/svg/coder.svg",
17+
"config_path": "",
18+
"description": "Coder Code Server is an open-source project that enables you to run Visual Studio Code (VS Code) on a remote machine, such as a desktop PC or virtual server. It serves a web-based version of VS Code that you can access from any browser via a URL, allowing remote development without needing an SSH connection. Unlike the official VS Code Server used by vscode.dev for Remote Tunnels, code-server is developed by Coder and operates independently, providing similar capabilities through a self-hosted solution.",
19+
"install_methods": [
20+
{
21+
"type": "default",
22+
"script": "tools/addon/coder-code-server.sh",
23+
"resources": {
24+
"cpu": null,
25+
"ram": null,
26+
"hdd": null,
27+
"os": null,
28+
"version": null
29+
}
30+
}
31+
],
32+
"default_credentials": {
33+
"username": null,
34+
"password": null
35+
},
36+
"notes": [
37+
{
38+
"text": "Execute within an existing LXC Console",
39+
"type": "warning"
40+
}
41+
]
42+
}

tools/addon/code-server.sh renamed to tools/addon/coder-code-server.sh

+29-29
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
77

88
function header_info {
9-
cat <<"EOF"
9+
cat <<"EOF"
1010
______ __ _____
1111
/ ____/___ ____/ /__ / ___/___ ______ _____ _____
1212
/ / / __ \/ __ / _ \ \__ \/ _ \/ ___/ | / / _ \/ ___/
@@ -26,7 +26,7 @@ CL=$(echo "\033[m")
2626
BFR="\\r\\033[K"
2727
HOLD="-"
2828
CM="${GN}${CL}"
29-
APP="Code Server"
29+
APP="Coder Code Server"
3030
hostname="$(hostname)"
3131
set -o errexit
3232
set -o errtrace
@@ -37,40 +37,40 @@ alias die='EXIT=$? LINE=$LINENO error_exit'
3737
trap die ERR
3838

3939
function error_exit() {
40-
trap - ERR
41-
local reason="Unknown failure occured."
42-
local msg="${1:-$reason}"
43-
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
44-
echo -e "$flag $msg" 1>&2
45-
exit $EXIT
40+
trap - ERR
41+
local reason="Unknown failure occured."
42+
local msg="${1:-$reason}"
43+
local flag="${RD}‼ ERROR ${CL}$EXIT@$LINE"
44+
echo -e "$flag $msg" 1>&2
45+
exit "$EXIT"
4646
}
4747
clear
4848
header_info
4949
if command -v pveversion >/dev/null 2>&1; then
50-
echo -e "⚠️ Can't Install on Proxmox "
51-
exit
50+
echo -e "⚠️ Can't Install on Proxmox "
51+
exit
5252
fi
5353
if [ -e /etc/alpine-release ]; then
54-
echo -e "⚠️ Can't Install on Alpine"
55-
exit
54+
echo -e "⚠️ Can't Install on Alpine"
55+
exit
5656
fi
5757
while true; do
58-
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
59-
case $yn in
60-
[Yy]*) break ;;
61-
[Nn]*) exit ;;
62-
*) echo "Please answer yes or no." ;;
63-
esac
58+
read -p "This will Install ${APP} on $hostname. Proceed(y/n)?" yn
59+
case $yn in
60+
[Yy]*) break ;;
61+
[Nn]*) exit ;;
62+
*) echo "Please answer yes or no." ;;
63+
esac
6464
done
6565

6666
function msg_info() {
67-
local msg="$1"
68-
echo -ne " ${HOLD} ${YW}${msg}..."
67+
local msg="$1"
68+
echo -ne " ${HOLD} ${YW}${msg}..."
6969
}
7070

7171
function msg_ok() {
72-
local msg="$1"
73-
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
72+
local msg="$1"
73+
echo -e "${BFR} ${CM} ${GN}${msg}${CL}"
7474
}
7575

7676
msg_info "Installing Dependencies"
@@ -80,22 +80,22 @@ apt-get install -y git &>/dev/null
8080
msg_ok "Installed Dependencies"
8181

8282
VERSION=$(curl -fsSL https://api.github.com/repos/coder/code-server/releases/latest |
83-
grep "tag_name" |
84-
awk '{print substr($2, 3, length($2)-4) }')
83+
grep "tag_name" |
84+
awk '{print substr($2, 3, length($2)-4) }')
8585

8686
msg_info "Installing Code-Server v${VERSION}"
87-
curl -fOL https://github.com/coder/code-server/releases/download/v$VERSION/code-server_${VERSION}_amd64.deb &>/dev/null
88-
dpkg -i code-server_${VERSION}_amd64.deb &>/dev/null
89-
rm -rf code-server_${VERSION}_amd64.deb
87+
curl -fOL https://github.com/coder/code-server/releases/download/v"$VERSION"/code-server_"${VERSION}"_amd64.deb &>/dev/null
88+
dpkg -i code-server_"${VERSION}"_amd64.deb &>/dev/null
89+
rm -rf code-server_"${VERSION}"_amd64.deb
9090
mkdir -p ~/.config/code-server/
91-
systemctl enable -q --now code-server@$USER
91+
systemctl enable -q --now code-server@"$USER"
9292
cat <<EOF >~/.config/code-server/config.yaml
9393
bind-addr: 0.0.0.0:8680
9494
auth: none
9595
password:
9696
cert: false
9797
EOF
98-
systemctl restart code-server@$USER
98+
systemctl restart code-server@"$USER"
9999
msg_ok "Installed Code-Server v${VERSION} on $hostname"
100100

101101
echo -e "${APP} should be reachable by going to the following URL.

0 commit comments

Comments
 (0)