wait-for-it rpm 很不错,目前只有debian 的没有rpm的包,所以制作了一个基于fpm
方法
git clone https://github.com/vishnubob/wait-for-it.git
chmod +x wait-for-it/wait-for-it.sh
fpm -s dir -t rpm -n wait-for-it --rpm-os linux -v v1.0-centos7 \
./wait-for-it/wait-for-it.sh=/usr/bin/wait-for-it
说明
具体的rpm已经放到GitHub了,可以直接使用
参考资料
https://github.com/rongfengliang/wait-for-it-rpm
https://github.com/vishnubob/wait-for-it
https://fpm.readthedocs.io/en/latest/getting-started.html