Sha256: a198947761790a8d348dab37b23de74fbdc749152690f6ff11f203c8c4ce53a6
Contents?: true
Size: 965 Bytes
Versions: 3
Compression:
Stored size: 965 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 --log /var/log/apphunkd.log --pidfile /var/log/apphunkd.pid` end def stop puts "Stopping.." `apphunkd stop -e production --log /var/log/apphunkd.log --pidfile /var/log/apphunkd.pid` end def restart stop start end def status if File.exist?('/var/log/apphunkd.pid') pid = File.readlines('/var/log/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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
apphunkd-0.13.0 | support/apphunkd.initd |
apphunkd-0.12.2 | support/apphunkd.initd |
apphunkd-0.12.1 | support/apphunkd.initd |