Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
bd07c59d
提交
bd07c59d
authored
3月 19, 2008
作者:
Michael Jerris
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup
git-svn-id:
http://svn.freeswitch.org/svn/freeswitch/trunk@7930
d0543943-73ff-0310-b7d9-9358b9ac24b2
上级
11d03864
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
18 行增加
和
17 行删除
+18
-17
freeswitch.init.redhat
build/freeswitch.init.redhat
+18
-17
没有找到文件。
build/freeswitch.init.redhat
浏览文件 @
bd07c59d
...
...
@@ -5,6 +5,7 @@
# The FreeSwitch Open Source Voice Platform
#
# chkconfig: - 89 14
# description: Starts and stops the freeswitch server daemon
# processname: freeswitch
# config: /opt/freeswitch/conf/freeswitch.conf
# pidfile: /opt/freeswitch/log/freeswitch.pid
...
...
@@ -19,19 +20,19 @@ if [ -f /etc/sysconfig/freeswitch ]; then
.
/etc/sysconfig/freeswitch
fi
prog
=
freeswitch
pidfile
=
/opt/freeswitch/log/freeswitch.pid
PROG_NAME
=
freeswitch
PID_FILE
=
/opt/freeswitch/log/freeswitch.pid
FS_USER
=
freeswitch
FS_FILE
=
/opt/freeswitch/bin/freeswitch
lockfile
=
/var/lock/subsys/freeswitch
LOCK_FILE
=
/var/lock/subsys/freeswitch
RETVAL
=
0
# <define any local shell functions used by the code that follows>
start
()
{
echo
-n
"Starting
$
prog
: "
if
[
-e
$
lockfile
]
;
then
if
[
-e
$
pidfile
]
&&
[
-e
/proc/
`
$pidfile
`
]
;
then
echo
-n
"Starting
$
PROG_NAME
: "
if
[
-e
$
LOCK_FILE
]
;
then
if
[
-e
$
PID_FILE
]
&&
[
-e
/proc/
`
$PID_FILE
`
]
;
then
echo
-n
$"cannot start freeswitch: freeswitch is already running."
;
failure
$"cannot start freeswitch: freeswitch already running."
;
echo
...
...
@@ -39,18 +40,18 @@ start() {
fi
fi
daemon
--user
$FS_USER
--pidfile
$
pidfile
"
$FS_FILE
$FREESWITCH_PARAMS
>/dev/null 2>&1"
daemon
--user
$FS_USER
--pidfile
$
PID_FILE
"
$FS_FILE
$FREESWITCH_PARAMS
>/dev/null 2>&1"
echo
RETVAL
=
$?
[
$RETVAL
-eq
0
]
&&
touch
$
lockfile
;
[
$RETVAL
-eq
0
]
&&
touch
$
LOCK_FILE
;
return
$RETVAL
}
stop
()
{
echo
-n
"Shutting down
$
prog
: "
if
[
!
-e
$
lockfile
]
;
then
echo
-n
$"cannot stop
$
prog
:
$prog
is not running."
failure
$"cannot stop
$
prog
:
$prog
is not running."
echo
-n
"Shutting down
$
PROG_NAME
: "
if
[
!
-e
$
LOCK_FILE
]
;
then
echo
-n
$"cannot stop
$
PROG_NAME
:
$PROG_NAME
is not running."
failure
$"cannot stop
$
PROG_NAME
:
$PROG_NAME
is not running."
echo
return
1
;
fi
...
...
@@ -58,12 +59,12 @@ stop() {
killproc freeswitch
RETVAL
=
$?
echo
[
$RETVAL
-eq
0
]
&&
rm
-f
$
lockfile
;
[
$RETVAL
-eq
0
]
&&
rm
-f
$
LOCK_FILE
;
return
$RETVAL
}
rhstatus
()
{
status
$
prog
;
status
$
PROG_NAME
;
}
case
"
$1
"
in
...
...
@@ -74,7 +75,7 @@ case "$1" in
stop
;;
status
)
status
$
prog
status
$
PROG_NAME
RETVAL
=
$?
;;
restart
)
...
...
@@ -87,10 +88,10 @@ case "$1" in
# to restart above>
;;
condrestart
)
[
-f
$
pidfile
]
&&
restart
||
:
[
-f
$
PID_FILE
]
&&
restart
||
:
;;
*
)
echo
"Usage:
$
prog
{start|stop|status|reload|restart"
echo
"Usage:
$
PROG_NAME
{start|stop|status|reload|restart"
exit
1
;;
esac
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论