blob: dfe560de2261e2346828232d7d740951441f3d11 (
plain)
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
31
32
33
|
#!/bin/sh
# PROVIDE: rstudio-server
# REQUIRE: DAEMON
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable rstudio_server:
# rstudio_server_enable : set to "YES" to enable theb daemon, default is "NO"
# rstudio_server_flags : any extra flags, default is ""
. /etc/rc.subr
name=rstudio_server
rcvar=rstudio_server_enable
load_rc_config $name
rstudio_server_enable=${rstudio_server_enable:-"NO"}
rstudio_server_flags=${rstudio_server_flags:-""}
procname=%%PREFIX%%/lib/rstudio-server/bin/rserver
command=%%PREFIX%%/lib/rstudio-server/bin/rserver
command_args="--server-user %%USER%% ${rstudio_server_flags}"
stop_postcmd=stop_postcmd
stop_postcmd()
{
# workaround for https://github.com/rstudio/rstudio/issues/8917
killall rsession rworkspaces 2>/dev/null # process list is taken from src/cpp/server/extras/admin/rstudio-server.in
}
run_rc_command "$1"
|