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
- Host: GitHub
- URL: https://github.com/vanng822/god
- Owner: vanng822
- License: mit
- Created: 2015-01-26T21:25:20.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-11-26T11:04:52.000Z (5 months ago)
- Last Synced: 2025-01-18T05:27:30.239Z (3 months ago)
- Topics: daemon, daemonize, go, livereload
- Language: Go
- Homepage:
- Size: 54.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)