repo: gitea: workflows: dfi: plugins: tor: refactor
Reflects updates to plugin impl.
This commit is contained in:
@@ -219,24 +219,10 @@ function client::finance::plugins::__tor()
|
|||||||
[ -z "$_plugins" ] && exit 1
|
[ -z "$_plugins" ] && exit 1
|
||||||
|
|
||||||
client::finance::up
|
client::finance::up
|
||||||
local -r _congrats="| grep Congratulations"
|
local -r _tor=("start" "restart" "stop")
|
||||||
|
for _arg in "${_tor[@]}"; do
|
||||||
# start
|
"${ci_shell[@]}" "$_plugins repo/tor.bash $_arg"
|
||||||
local _tries=0
|
|
||||||
while [ $_tries -lt 3 ]; do
|
|
||||||
"${ci_shell[@]}" "$_plugins repo/tor.bash start" $_congrats
|
|
||||||
[ $? -eq 0 ] && break || ((_tries++))
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# restart
|
|
||||||
local _tries=0
|
|
||||||
while [ $_tries -lt 3 ]; do
|
|
||||||
"${ci_shell[@]}" "$_plugins repo/tor.bash restart" $_congrats
|
|
||||||
[ $? -eq 0 ] && break || ((_tries++))
|
|
||||||
done
|
|
||||||
|
|
||||||
# stop
|
|
||||||
"${ci_shell[@]}" "$_plugins repo/tor.bash stop"
|
|
||||||
client::finance::down
|
client::finance::down
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user