3 # Copyright (C) 2012 Steven McDonald <steven@steven-mcdonald.id.au>
5 # This program is free software. It comes without any warranty, to the
6 # extent permitted by applicable law. You can redistribute it and/or
7 # modify it under the terms of the Do What The Fuck You Want To Public
8 # License, Version 2, as published by Sam Hocevar. See the file COPYING
9 # in the root of this program's source distribution for details, or:
11 # http://sam.zoy.org/wtfpl/COPYING
16 svc = AIDS::Service.new(argv[1]) if argv[1]
28 AIDS.get_all_services.sort_by{|s|s.name}.each{|s|display_status(s)}
35 def display_status(svc)
36 print "#{svc.name[0..14]}#{' ' * (16 - svc.name[0..14].length)}"
39 AIDS::RUNLEVEL_ALL.each do |r|
40 print "\t" if prettystatus
51 print "#{r}:#{prettystatus}"
58 AIDS - Assistant for Initialisation of Debian Services
60 Usage: #{$0} command [service]
62 Command may be one of:
71 Lists the current status of the service, or of all services if
77 main(ARGV) if $0 == __FILE__