3 # This program is free software. It comes without any warranty, to the
4 # extent permitted by applicable law. You can redistribute it and/or
5 # modify it under the terms of the Do What The Fuck You Want To Public
6 # License, Version 2, as published by Sam Hocevar. See the file COPYING
7 # in the root of this program's source distribution for details, or:
9 # http://sam.zoy.org/wtfpl/COPYING
14 svc = AIDS::Service.new(argv[1]) if argv[1]
26 AIDS.get_all_services.sort_by{|s|s.name}.each{|s|display_status(s)}
33 def display_status(svc)
34 print "#{svc.name[0..14]}#{' ' * (16 - svc.name[0..14].length)}"
37 AIDS::RUNLEVEL_ALL.each do |r|
38 print "\t" if prettystatus
49 print "#{r}:#{prettystatus}"
56 AIDS - Assistant for Initialisation of Debian Services
58 Usage: #{$0} command [service]
60 Command may be one of:
69 Lists the current status of the service, or of all services if
75 main(ARGV) if $0 == __FILE__