Sha256: 24e00d271c7dd621501c5e31b04212490a9e45b8b60e15079e60c7c5185c0ab9
Contents?: true
Size: 845 Bytes
Versions: 7
Compression:
Stored size: 845 Bytes
Contents
#!/usr/bin/env ruby # # apphunkd Startup script for apphunkd by Andreas Wolff # # description: apphunkd is a daemon for sending messages from your applications to apphunk.com # def start puts "Starting.." `apphunkd start -e production` end def stop puts "Stopping.." `apphunkd stop -e production` end def restart stop start end def status if File.exist?('/var/run/apphunkd.pid') pid = File.readlines('/var/run/apphunkd.pid')[0].chomp puts "apphunkd running (#{pid}).." else puts "apphunkd not running.." end end unless ['start', 'stop', 'restart', 'status'].include? ARGV.first puts "Usage: apphunkd {start|stop|restart|status}" exit end case when ARGV.include?('start') start when ARGV.include?('stop') stop when ARGV.include?('restart') restart when ARGV.include?('status') status end
Version data entries
7 entries across 7 versions & 1 rubygems