2019-06-09 18:08:59 +02:00
|
|
|
|
|
|
|
require "./service/service.cr"
|
|
|
|
|
|
|
|
require "./config.cr"
|
|
|
|
|
|
|
|
ServiceDefinition.load SERVICES_DIRECTORY
|
|
|
|
Environment.load ENVIRONMENTS_DIRECTORY
|
|
|
|
Service.load RC_DIRECTORY
|
|
|
|
|
2019-06-10 14:32:30 +02:00
|
|
|
LibC.setuid 0
|
|
|
|
LibC.setgid 0
|
|
|
|
|
2019-06-09 18:08:59 +02:00
|
|
|
Service.get_by_id(ARGV[0]).try do |service|
|
|
|
|
puts service.status PID_DIRECTORY
|
|
|
|
exit 0
|
|
|
|
end
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
|