Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
0fd36364
提交
0fd36364
authored
4月 12, 2011
作者:
Eduardo Nunes Pereira
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
- Improvements in getk3l script, now a option to download only the
k3lclient
上级
e4c8edef
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
55 行增加
和
32 行删除
+55
-32
getk3l.sh
src/mod/endpoints/mod_khomp/tools/getk3l.sh
+55
-32
没有找到文件。
src/mod/endpoints/mod_khomp/tools/getk3l.sh
浏览文件 @
0fd36364
...
@@ -41,28 +41,25 @@
...
@@ -41,28 +41,25 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
###############################################################################
###############################################################################
K3L_FILE
=
"k3l_2.1_client.sh"
PARAM
=
"0"
clean
()
if
[
"
$1
"
]
{
printf
"
$1
"
exit
1
}
if
[
`
whoami
`
!=
'root'
]
then
then
clean
"Need to be root
\n
"
PARAM
=
$1
fi
fi
#if [ "w$FREESWITCH_PATH" == "w" ]
#then
# clean "FreeSWITCH source PATH is needed: \n\tSet \"FREESWITCH_PATH=\"\n"
#fi
if
!
which
'kserver'
&> /dev/null
help
()
then
{
echo
"k3l will be installed"
echo
"Usage: getk3l.sh [OPTION]"
K3L_FILE
=
"k3l_2.1_client.sh"
echo
echo
" -h, --help print this help"
echo
" -d, --download only download the k3l package withou doing the installation"
echo
}
download
()
{
if
[
"w
`
uname
-m
|
grep
x86_64
`
"
==
"w"
]
if
[
"w
`
uname
-m
|
grep
x86_64
`
"
==
"w"
]
then
then
echo
"Downloading i686 package"
echo
"Downloading i686 package"
...
@@ -71,23 +68,49 @@ then
...
@@ -71,23 +68,49 @@ then
echo
"Downloading x86_64 package"
echo
"Downloading x86_64 package"
wget
-t15
-c
--progress
=
bar:force
-O
$K3L_FILE
.gz http://www.khomp.com.br/binaries/softpbx/freeswitch/k3l_2.1_client_x86-64.sh.gz
wget
-t15
-c
--progress
=
bar:force
-O
$K3L_FILE
.gz http://www.khomp.com.br/binaries/softpbx/freeswitch/k3l_2.1_client_x86-64.sh.gz
fi
fi
}
gunzip
$K3L_FILE
.gz
clean
()
chmod
0755
$K3L_FILE
{
printf
"
$1
"
(
./
$K3L_FILE
)
||
clean
"Error on k3l install
\n
"
exit
1
}
rm
$K3L_FILE
fi
if
[
"w
`
kserver
--version
|
grep
2.1
`
"
==
"w"
]
install
()
then
{
clean
"k3l version 2.1 must be installed:
\n\t
Uninstall the old version of k3l and try again
\n
"
if
[
`
whoami
`
!=
'root'
]
fi
then
clean
"Need to be root to install !
\n
"
exit
1
fi
#make || clean "Error on compilation\n"
if
!
which
'kserver'
&> /dev/null
then
download
gunzip
$K3L_FILE
.gz
chmod
0755
$K3L_FILE
(
./
$K3L_FILE
)
||
clean
"Error on k3l install
\n
"
rm
$K3L_FILE
fi
}
#make install || clean "Error on installation\n"
if
[
$PARAM
==
'--help'
-o
$PARAM
==
'-h'
]
then
help
exit
0
elif
[
$PARAM
==
'--download'
-o
$PARAM
==
'-d'
]
then
download
exit
0
else
echo
"k3l will be installed"
install
echo
"Successfully installed!"
if
[
"w
`
kserver
--version
|
grep
2.1
`
"
==
"w"
]
then
clean
"k3l version 2.1 must be installed:
\n\t
Uninstall the old version of k3l and try again
\n
"
exit
1
fi
echo
"Successfully installed!"
fi
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论