Lines 10-21
Link Here
|
10 |
name="crashplan" |
10 |
name="crashplan" |
11 |
rcvar=${name}_enable |
11 |
rcvar=${name}_enable |
12 |
|
12 |
|
13 |
command="/usr/bin/cpuset -l 0 %%PREFIX%%/share/crashplan/bin/CrashPlanEngine" |
13 |
crashplan_bin="%%PREFIX%%/share/crashplan/bin" |
14 |
|
14 |
command="${crashplan_bin}/CrashPlanEngine" |
15 |
pidfile="/var/run/CrashPlanEngine.pid" |
15 |
pidfile="/var/run/CrashPlanEngine.pid" |
16 |
|
16 |
|
17 |
start_precmd="install -d /var/log/crashplan" |
17 |
crashplan_start() { |
18 |
start_cmd="${command} start" |
18 |
local crashplan_poll_selector |
|
|
19 |
crashplan_poll_selector="-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider" |
20 |
|
21 |
/usr/bin/install -d /var/log/crashplan || exit 1 |
22 |
|
23 |
sed -E -e "s/-Djava.nio.channels.spi.SelectorProvider=[^[:blank:]]+//" \ |
24 |
-e "s/SRV_JAVA_OPTS=\"/SRV_JAVA_OPTS=\"${crashplan_poll_selector} /" \ |
25 |
-e "s/GUI_JAVA_OPTS=\"/GUI_JAVA_OPTS=\"${crashplan_poll_selector} /" \ |
26 |
-i bak "${crashplan_bin}/run.conf" || exit 1 |
27 |
|
28 |
/usr/bin/cpuset -l 0 ${command} start |
29 |
} |
30 |
|
31 |
start_cmd="${name}_start" |
19 |
stop_cmd="${command} stop" |
32 |
stop_cmd="${command} stop" |
20 |
|
33 |
|
21 |
load_rc_config ${name} |
34 |
load_rc_config ${name} |