New class Dash::Project
[dashstudio.git] / dashdctl.rb
blobc9f2b7c6d6b0c7e75ff9dc6c294ec0111c2618d2
1 #!/usr/bin/ruby
3 require 'Qt4'
5 print "Host: "
6 host = readline.strip
8 print "Port: "
9 port = readline.strip.to_i
12 print "#{host}:#{port} (Y/n) "
13 ok = readline.downcase
15 if ok != "n"
16     begin
17         settings = Qt::Settings.new("dashd", "dashd");
18         settings.beginGroup("Connection")
19         
20         settings.setValue("host", Qt::Variant.new(host) )
21         settings.setValue("port", Qt::Variant.new(port) )
22         
23         settings.endGroup()
24         
25         settings.sync
26         settings.dispose
27     end
28     
29     `pkill dashd` # Restart the server
30 end