System service controller to launch all servers which config files are in a directory.
# File lib/thin/controllers/service.rb, line 18 18: def config_path 19: @options[:all] || DEFAULT_CONFIG_PATH 20: end
# File lib/thin/controllers/service.rb, line 34 34: def install(config_files_path=DEFAULT_CONFIG_PATH) 35: if File.exist?(INITD_PATH) 36: log ">> Thin service already installed at #{INITD_PATH}" 37: else 38: log ">> Installing thin service at #{INITD_PATH} ..." 39: sh "mkdir -p #{File.dirname(INITD_PATH)}" 40: log "writing #{INITD_PATH}" 41: File.open(INITD_PATH, 'w') do |f| 42: f << ERB.new(File.read(TEMPLATE)).result(binding) 43: end 44: sh "chmod +x #{INITD_PATH}" # Make executable 45: end 46: 47: sh "mkdir -p #{config_files_path}" 48: 49: log '' 50: log "To configure thin to start at system boot:" 51: log "on RedHat like systems:" 52: log " sudo /sbin/chkconfig --level 345 #{NAME} on" 53: log "on Debian-like systems (Ubuntu):" 54: log " sudo /usr/sbin/update-rc.d -f #{NAME} defaults" 55: log "on Gentoo:" 56: log " sudo rc-update add #{NAME} default" 57: log '' 58: log "Then put your config files in #{config_files_path}" 59: end
# File lib/thin/controllers/service.rb, line 30 30: def restart 31: run :restart 32: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.