Sha256: f330a71020471e7b587725a55e9b5321fb0857cbf4dd751a4294b79f58ab76dc
Contents?: true
Size: 1.15 KB
Versions: 7
Compression:
Stored size: 1.15 KB
Contents
#!/usr/bin/env ruby #/ Usage: rmails action #/ #/ Actions: #/ --install #/ Install all compoments of the system. #/ You must be root to run this. #/ --start-app #/ Starts server of configuration app. #/ You may have to be root to run this. #/ --stop-app #/ Stops server of configuration app. #/ You may have to be root to run this. $stderr.sync = true require 'optparse' require File.expand_path('../../config/application', __FILE__) require 'rmails/installer' require 'rmails/runner' # default options install = false start = false stop = false # parse arguments file = __FILE__ ARGV.options do |opts| opts.on("--install") { |install| } opts.on("--start-app") { |start| } opts.on("--stop-app") { |stop| } opts.on_tail("-h", "--help") { exec "grep ^#/<'#{file}'|cut -c4-" } opts.parse! end if not(install or start or stop) or(start and stop) exec "grep ^#/<'#{file}'|cut -c4-" if install setup = Rmails::Installer.new setup.run elsif start app = Rmails::Runner.new app.start end elsif stop app = Rmails::Runner.new app.stop end
Version data entries
7 entries across 7 versions & 1 rubygems
Version | Path |
---|---|
rmails-0.2.2 | bin/rmails |
rmails-0.2.1 | bin/rmails |
rmails-0.2.0 | bin/rmails |
rmails-0.1.6 | bin/rmails |
rmails-0.1.5 | bin/rmails |
rmails-0.1.4 | bin/rmails |
rmails-0.1.3 | bin/rmails |