mirror of
https://git.adityakumar.xyz/code-server-openrc.git
synced 2025-02-22 07:40:00 +00:00
add script
This commit is contained in:
parent
db8dba5f9b
commit
9b90251d88
1 changed files with 39 additions and 0 deletions
39
code-server
Normal file
39
code-server
Normal file
|
@ -0,0 +1,39 @@
|
|||
name=$RC_SVCNAME
|
||||
description="$name - VS Code on a remote server"
|
||||
user="" # your username here
|
||||
homedir="/home/$user"
|
||||
command="$(which code-server)"
|
||||
# Just because you can do this does not mean you should. Use ~/.config/code-server/config.yaml instead
|
||||
#command_args="--extensions-dir $homedir/.local/share/$name/extensions --user-data-dir $homedir/.local/share/$name --disable-telemetry"
|
||||
command_user="$user:$user"
|
||||
pidfile="/run/$name/$name.pid"
|
||||
command_background="yes"
|
||||
extra_commands="report"
|
||||
|
||||
depend() {
|
||||
use logger dns
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --directory --owner $command_user --mode 0755 /run/$name /var/log/$name
|
||||
}
|
||||
|
||||
start() {
|
||||
default_start
|
||||
report
|
||||
}
|
||||
|
||||
stop() {
|
||||
default_stop
|
||||
}
|
||||
|
||||
status() {
|
||||
default_status
|
||||
report
|
||||
}
|
||||
|
||||
report() {
|
||||
# Report to the user
|
||||
einfo "Reading configuration from ~/.config/code-server/config.yaml"
|
||||
}
|
Loading…
Reference in a new issue