lib/capistrano/tasks/nginx-unit.rake in capistrano-nginx-unit-0.6.0 vs lib/capistrano/tasks/nginx-unit.rake in capistrano-nginx-unit-0.6.1
- old
+ new
@@ -104,11 +104,11 @@
"'http://localhost/#{path}'"
]
args << "-d '#{json}'" if json
- res = JSON.parse(capture(:curl, *args))
+ res = JSON.parse(capture(:sudo, :curl, *args))
if res["error"]
error res.inspect
raise "NGINX Unit: #{res["error"]}"
else
info res.inspect
@@ -116,10 +116,10 @@
end
# Get current configuration
def nginx_unit_conf
JSON.parse(capture(
- :curl,
+ :sudo, :curl,
"--unix-socket #{fetch(:nginx_unit_control_sock)}",
"http://localhost/"
))
end
end