`service del` takes service ids as parameters

master
Luka Vandervelden 2019-10-25 13:15:44 +02:00
parent bf2075be9e
commit add94be507
1 changed files with 8 additions and 1 deletions

View File

@ -90,7 +90,14 @@ commands.push "add", "Adds a service to an environment." do |args|
end
commands.push "del", "Removes a service from an environment." do |args|
Service.new(args[0], args[1]?).remove RC_DIRECTORY
if args.size < 1
STDERR.puts "usage: service del <id> [id [...]]"
exit 1
end
args.each do |id|
Service.get_by_id(id).try &.remove RC_DIRECTORY
end
end
commands.push "start", "Starts a service." do