An open API service indexing awesome lists of open source software.

https://github.com/vanng822/god

Start processes and keep an eye on them
https://github.com/vanng822/god

daemon daemonize go livereload

Last synced: about 2 months ago
JSON representation

Start processes and keep an eye on them

Awesome Lists containing this project

README

        

# god

Keep an eye on some process running. God will restart your program if it exits unexpected. This is helpful when you don't have time 24/7 to watch over your applications. It restarts program on SIGHUP, graceful restart on SIGUSR2 and forward SIGUSR1.

Be aware this may not work well if your program forks another process, special in watch mode.

# Usage

### build

go build

### run

>> ./god --pidfile god.pid -s go run test_program/test_bin.go

### Check test_bin.go working

//Open in browser
http://127.0.0.1:8080/

### run in watch mode, for a go program, ie don't run "go run"

>> ./god --watch folder1,folder2 --watch-exts go,json --pidfile god.pid -s make build-go-program
>> ./god --watch touchfolder --watch-exts touch --pidfile god2.pid -s /path/to/go-program

### restart

>> kill -s HUP $(cat god.pid)
>> kill -s USR2 $(cat god.pid)

### stop

>> kill $(cat god.pid)