今天的任务是把make好的install作成rpm.
if [ -z "`ps -ef|grep kamailio.pid|grep -v grep`" ];then # 判断kamailio.pid是否存在,若为空说明没运行,要启动 kamctl start #2>/dev/null # 2>&1 #上面的判断,注意双引号必须的 else echo "Kamailio is running!" #否则就是已经在运行了,也可以选择重新启动 # kamctl restart #2>/dev/null # 2>&1 fi
sed -i "s/kamailio/addvoip/g" `grep kamailio -rl ./`
例 2
make FLAVOUR=ddd tar
mv kamailio-3.1/kamailio/kamailio-3.1.2_src.tar.gz rpmbuild/SOURCES/ cp kamailio-3.1/kamailio/pkg/kamailio/rpm/kamailio.init rpmbuild/SOURCES/ cp kamailio-3.1/kamailio/pkg/kamailio/rpm/kamailio.default rpmbuild/SOURCES/ cp kamailio-3.1/kamailio/pkg/kamailio/rpm/kamailio.spec.CentOS rpmbuild/SPECS/
cd ~/rpmbuild/SPECS rpmbuild -ba kamailio.spec.CenOS
http://www.3gpp.org/
http://www.ietf.org/
http://www.wireshark.org/
http://en.wikipedia.org/