Add WTFPL licence
[aids.git] / bin / aids
index 5388ea942bba7414a2768b0930a6de3a332ad31c..34444b36de643ad17ad8d5fb40aded053da551ba 100755 (executable)
--- a/bin/aids
+++ b/bin/aids
@@ -1,5 +1,13 @@
 #!/usr/bin/ruby1.8
 
+# This program is free software. It comes without any warranty, to the
+# extent permitted by applicable law. You can redistribute it and/or
+# modify it under the terms of the Do What The Fuck You Want To Public
+# License, Version 2, as published by Sam Hocevar. See the file COPYING
+# in the root of this program's source distribution for details, or:
+#
+#   http://sam.zoy.org/wtfpl/COPYING
+
 require 'lib/aids'
 
 def main(argv)
@@ -23,9 +31,11 @@ def main(argv)
 end
 
 def display_status(svc)
-       print "#{svc.name[0..14]}:#{' ' * (16 - svc.name[0..14].length)}"
+       print "#{svc.name[0..14]}#{' ' * (16 - svc.name[0..14].length)}"
        status = svc.status
+       prettystatus = nil
        AIDS::RUNLEVEL_ALL.each do |r|
+               print "\t" if prettystatus
                case status[r]
                        when :start
                                prettystatus = 'on'
@@ -36,7 +46,7 @@ def display_status(svc)
                        else
                                next
                end
-                       print "#{r}: #{prettystatus + ' ' * (8 - prettystatus.length)}"
+                       print "#{r}:#{prettystatus}"
                end
        puts
 end