summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-misc/boinc/files/boinc.init')
-rw-r--r--sci-misc/boinc/files/boinc.init20
1 files changed, 12 insertions, 8 deletions
diff --git a/sci-misc/boinc/files/boinc.init b/sci-misc/boinc/files/boinc.init
index ceeeac87145e..23450a6857cc 100644
--- a/sci-misc/boinc/files/boinc.init
+++ b/sci-misc/boinc/files/boinc.init
@@ -184,15 +184,17 @@ resume() {
env_check || return 1
local password=""
- local master_urls=( \
- $("${BOINCCMD}" --get_project_status | \
- sed -n 's/\s*master URL: //p') \
- )
if need_passwd_arg; then
password="--passwd \"$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")\""
fi
+ local master_urls=( \
+ $(cd "${RUNTIMEDIR}" ; \
+ "${BOINCCMD}" ${password} --get_project_status | \
+ sed -n 's/\s*master URL: //p') \
+ )
+
for url in "${master_urls[@]}"; do
ebegin "Resuming $url"
start-stop-daemon --user "${USER}:${GROUP}" --quiet \
@@ -207,15 +209,17 @@ suspend() {
env_check || return 1
local password=""
- local master_urls=( \
- $("${BOINCCMD}" --get_project_status | \
- sed -n 's/\s*master URL: //p') \
- )
if need_passwd_arg; then
password="--passwd \"$(cat "${RUNTIMEDIR}/gui_rpc_auth.cfg")\""
fi
+ local master_urls=( \
+ $(cd "${RUNTIMEDIR}" ; \
+ "${BOINCCMD}" ${password} --get_project_status | \
+ sed -n 's/\s*master URL: //p') \
+ )
+
for url in "${master_urls[@]}"; do
ebegin "Suspending $url"
start-stop-daemon --user "${USER}:${GROUP}" --quiet \