安装
git clone git://github.com/bmc/daemonize.git
sh configure && make && sudo make install
which daemonize
示例
# 后台启动prometheus
daemonize -c /data/prometheus/ /data/prometheus/up.sh
up.sh内容如下:
/data/prometheus/prometheus --web.listen address="0.0.0.0:9090" --web.read-timeout=5m --web.max connections=10 --storage.tsdb.retention=15d --storage.tsdb.path="data/" --query.max-concurrency=20 --query.timeout=2m