Class: OPNsenseAPI::Core::Monit::Service
- Inherits:
-
Object
- Object
- OPNsenseAPI::Core::Monit::Service
- Includes:
- OPNsenseAPI::Core
- Defined in:
- lib/opnsense_api/core/monit/service.rb
Overview
Constant Summary collapse
- BASE_PATH =
'/monit/service'
Instance Method Summary collapse
- #check(body = {}) ⇒ Object
- #reconfigure(body = {}) ⇒ Object
- #restart(body = {}) ⇒ Object
- #start(body = {}) ⇒ Object
- #status(params = {}) ⇒ Object
- #stop(body = {}) ⇒ Object
Methods included from OPNsenseAPI::Core
Instance Method Details
#check(body = {}) ⇒ Object
27 28 29 |
# File 'lib/opnsense_api/core/monit/service.rb', line 27 def check(body = {}) @client.post("#{BASE_PATH}/check", body) end |
#reconfigure(body = {}) ⇒ Object
31 32 33 |
# File 'lib/opnsense_api/core/monit/service.rb', line 31 def reconfigure(body = {}) @client.post("#{BASE_PATH}/reconfigure", body) end |
#restart(body = {}) ⇒ Object
35 36 37 |
# File 'lib/opnsense_api/core/monit/service.rb', line 35 def restart(body = {}) @client.post("#{BASE_PATH}/restart", body) end |
#start(body = {}) ⇒ Object
39 40 41 |
# File 'lib/opnsense_api/core/monit/service.rb', line 39 def start(body = {}) @client.post("#{BASE_PATH}/start", body) end |
#status(params = {}) ⇒ Object
43 44 45 |
# File 'lib/opnsense_api/core/monit/service.rb', line 43 def status(params = {}) @client.get("#{BASE_PATH}/status", params) end |
#stop(body = {}) ⇒ Object
47 48 49 |
# File 'lib/opnsense_api/core/monit/service.rb', line 47 def stop(body = {}) @client.post("#{BASE_PATH}/stop", body) end |