Skip to content

Instantly share code, notes, and snippets.

@hector
hector / god.service
Created February 9, 2022 22:26
God systemd
[Unit]
Description=God: A process monitoring framework in Ruby
After=network.target
[Service]
Restart=always
ExecStart=/etc/god/god.sh start
ExecStop=/etc/god/god.sh stop
[Install]

Keybase proof

I hereby claim:

  • I am hector on github.
  • I am hparra (https://keybase.io/hparra) on keybase.
  • I have a public key ASDUtKRD4i0nhtywpkOZ7oXmvA3J2Cp3rncQi87f1KOTOAo

To claim this, I am signing this object:

@hector
hector / config.yml
Last active January 26, 2020 16:18
ngrok as a service
authtoken: YOUR_TOKEN_HERE
json_resolver_url: ""
dns_resolver_ips: []
log: /var/log/ngrok.log
tunnels:
ssh:
proto: tcp
addr: 22
@hector
hector / stale_workers.god
Created October 2, 2012 21:23
Daemon to kill stale resque workers
rails_path = ENV['RAILS_ROOT'] || File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
God.watch do |w|
w.dir = rails_path
w.name = "stale_workers"
w.group = "vocsyn"
w.interval = 30.seconds
w.uid = 'deployer'
w.gid = 'staff'
@hector
hector / god.conf
Created August 31, 2012 15:41
God Upstart
description "God Process Monitoring"
author "Hector Parra <wizbcn@gmail.com>"
start on runlevel [2345]
stop on runlevel [!2345]
respawn # respawn the service if it dies
respawn limit 5 10 # stop respawning if it fails 5 times in 10 seconds
exec sudo god -D -c /etc/god/master.conf -l /var/log/god.log