- sync to upstream version from SB
- added -d option to start as a daemon thx: hoho