Systemized
exposes systemd components as Ruby Objects.
As an attempt to tame some of the complexity of systemd
.
gem install systemized
The following will read the last ten log entries for the concourse-worker
service.
require 'systemized'
service = Systemized::Service.new 'concourse-worker'
service.journal.read(10)
This will stop the concourse-worker
service if it is current active, then start it.
require 'systemized'
service = Systemized::Service.new 'concourse-worker'
service.stop if service.active?
service.start
systemized
is available under the MIT License. See LICENSE.txt
for the full text.