Report abuse

lrwxrwxrwx 1 aj aj 7 2008-05-16 22:57 /home/aj/bin/s -> service

#!/usr/bin/env ruby
begin
  if ARGV.length > 1
    unless File.exists?(ARGV[0])
      system("sudo /etc/init.d/" + ARGV.join(" "))
    else
      raise "/etc/init.d/" + ARGV[0] + " doesn't exist\n"
    end
  else
    raise "Not enough arguments\nservice  \n"
  end
end