Skip to content

Commit 943a459

Browse files
committed
move openrc.md to install.md
1 parent 0931e1e commit 943a459

File tree

2 files changed

+64
-56
lines changed

2 files changed

+64
-56
lines changed

docs/install.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- [Debian, Ubuntu](#debian-ubuntu)
1010
- [Fedora, CentOS, RHEL, SUSE](#fedora-centos-rhel-suse)
1111
- [Arch Linux](#arch-linux)
12+
- [Artix Linux](#artix-linux)
1213
- [macOS](#macos)
1314
- [Docker](#docker)
1415
- [Helm](#helm)
@@ -190,6 +191,69 @@ sudo systemctl enable --now code-server@$USER
190191
# Now visit http://127.0.0.1:8080. Your password is in ~/.config/code-server/config.yaml
191192
```
192193

194+
## Artix Linux
195+
```bash
196+
# Install code-server from the AUR
197+
git clone https://aur.archlinux.org/code-server.git
198+
cd code-server
199+
makepkg -si
200+
```
201+
202+
Save the file as `code-server` in `/etc/init.d/` and make it executable with `chmod +x code-server`. Put your username in line 3.
203+
204+
```bash
205+
#!/sbin/openrc-run
206+
name=$RC_SVCNAME
207+
description="$name - VS Code on a remote server"
208+
user="" # your username here
209+
homedir="/home/$user"
210+
command="$(which code-server)"
211+
# Just because you can do this does not mean you should. Use ~/.config/code-server/config.yaml instead
212+
#command_args="--extensions-dir $homedir/.local/share/$name/extensions --user-data-dir $homedir/.local/share/$name --disable-telemetry"
213+
command_user="$user:$user"
214+
pidfile="/run/$name/$name.pid"
215+
command_background="yes"
216+
extra_commands="report"
217+
218+
depend() {
219+
use logger dns
220+
need net
221+
}
222+
223+
start_pre() {
224+
checkpath --directory --owner $command_user --mode 0755 /run/$name /var/log/$name
225+
}
226+
227+
start() {
228+
default_start
229+
report
230+
}
231+
232+
stop() {
233+
default_stop
234+
}
235+
236+
status() {
237+
default_status
238+
report
239+
}
240+
241+
report() {
242+
# Report to the user
243+
einfo "Reading configuration from ~/.config/code-server/config.yaml"
244+
}
245+
```
246+
247+
Start on boot with default runlevel
248+
```
249+
rc-update add code-server default
250+
```
251+
252+
Start the service immediately
253+
```
254+
rc-service code-server start
255+
```
256+
193257
## macOS
194258

195259
```bash

docs/openrc.md

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)