Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
ff12bd6c
提交
ff12bd6c
authored
11月 20, 2015
作者:
Ken Rice
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "FS-8369 Fixes"
This reverts commit
389d24da
.
上级
d5520a66
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
46 行增加
和
25 行删除
+46
-25
Makefile.am
build/Makefile.am
+3
-3
freeswitch.service.in
build/startup/freeswitch.service.in
+3
-4
install_systemd.sh.in
build/startup/install_systemd.sh.in
+14
-11
configure.ac
configure.ac
+26
-7
没有找到文件。
build/Makefile.am
浏览文件 @
ff12bd6c
...
...
@@ -55,10 +55,10 @@ install:
@
echo
" + Install/Re-install default config: +"
@
echo
" + ---------------------------------- +"
@
echo
" +
$(MK)
samples +"
if
SYSTEMD
_INIT
if
KNOWN
_INIT
@echo
" + +"
@echo " + Install s
ystemd startup scripts
:
+"
@
echo
" + ------------------------
--------
+"
@echo " + Install s
tartup scripts
:
+"
@
echo
" + ------------------------
+"
@
echo
" + +"
@
echo
" + build/startup/install_systemd.sh +"
endif
...
...
build/startup/freeswitch.service.in
浏览文件 @
ff12bd6c
...
...
@@ -5,12 +5,11 @@ After=syslog.target network.target local-fs.target
[Service]
; service
Type=forking
PIDFile=@run
time
dir@/freeswitch.pid
PIDFile=@rundir@/freeswitch.pid
PermissionsStartOnly=true
Environment="DAEMON_OPTS=-nonat"
EnvironmentFile=-/etc/sysconfig/freeswitch
EnvironmentFile=-/etc/default/freeswitch
ExecStart=@bindir_expanded@/freeswitch -u freeswitch -g freeswitch -ncwait -rp ${DAEMON_OPTS}
EnvironmentFile=-/etc/@environmentfilelocation@/freeswitch
ExecStart=@bindir@/freeswitch -u freeswitch -g freeswitch -ncwait -rp ${DAEMON_OPTS}
TimeoutSec=20s
Restart=on-failure
; exec
...
...
build/startup/install_systemd.sh.in
浏览文件 @
ff12bd6c
#!/bin/bash
# @DISTRO@ installer
# Niek Vlessert
USER
=
`
whoami
`
DISTRO
=
$(
source
/etc/os-release
&&
echo
$PRETTY_NAME
)
DISTRO
=
@DISTRO@
if
[
$USER
!=
"root"
]
;
then
SUDO
=
`
which
sudo
|
awk
-F
"/"
'{print $NF}'
`
if
[
-z
$SUDO
]
;
then
...
...
@@ -19,34 +20,36 @@ if [ $USER != "root" ] ; then
fi
echo
echo
"This will do several things on your
$DISTRO
installation:"
echo
"This will do several things on your
@DISTRO@
installation:"
echo
"- Create user freeswitch and add it to group freeswitch"
FSPATH
=
@prefix@
if
[[
$FSPATH
==
*
"freeswitch"
*
]]
then
echo
"- Set permissions on @prefix@ and files in @bindir_expanded@"
fi
echo
"- Install systemd unit file and other required files"
echo
"- Install systemd unit file"
echo
"- Install /etc/@environmentfilelocation@/freeswitch"
echo
read
-p
"Do you want to continue? (y/n) "
-n
1
-r
if
[[
$REPLY
=
~ ^[yY]
$
]]
then
echo
echo
"Installing..."
$SUDO
useradd
-d
@confdir@
-r
-U
-s
/bin/false
-c
"FreeSWITCH open source softswitch"
freeswitch
$SUDO
groupadd freeswitch
if
DISTRO
=
"debian8"
;
then
$SUDO
adduser
--disabled-password
--quiet
--system
--home
@confdir@
--gecos
"FreeSWITCH open source softswitch"
--ingroup
freeswitch freeswitch
elif
DISTRO
=
"centos7"
;
then
$SUDO
adduser
--system
--home
@confdir@
-c
"FreeSWITCH open source softswitch"
-g
freeswitch freeswitch
fi
if
[[
$FSPATH
==
*
"freeswitch"
*
]]
then
$SUDO
chown
-R
freeswitch:freeswitch @prefix@
$SUDO
chmod
-R
ug
=
rwX,o
=
@prefix@
$SUDO
chmod
-R
u
=
rwx,g
=
rx @bindir_expanded@/
*
fi
$SUDO
cp
build/startup/freeswitch.service /etc/systemd/system/
$SUDO
cp
build/startup/freeswitch.tmpfile /etc/tmpfiles.d/freeswitch.conf
if
[
-d
/etc/sysconfig
]
;
then
$SUDO
cp
build/startup/freeswitch.default /etc/sysconfig/freeswitch
else
$SUDO
cp
build/startup/freeswitch.default /etc/default/freeswitch
fi
$SUDO
cp
init/freeswitch.service /etc/systemd/system/
$SUDO
cp
init/freeswitch.tmpfile /etc/tmpfiles.d/freeswitch.conf
$SUDO
cp
init/freeswitch.default /etc/@environmentfilelocation@/freeswitch
$SUDO
systemd-tmpfiles
--clean
--create
$SUDO
systemctl daemon-reload
echo
...
...
configure.ac
浏览文件 @
ff12bd6c
...
...
@@ -773,14 +773,33 @@ case "$host" in
;;
*linux*)
APR_ADDTO([PLATFORM_CORE_LIBS], [-ldl -lcrypt -lrt])
systemdinit=false
if test -d /run/systemd/system; then
systemdinit=true
AC_SUBST(bindir_expanded)
AC_CONFIG_FILES([build/startup/install_systemd.sh], [chmod +x build/startup/install_systemd.sh])
AC_CONFIG_FILES([build/startup/freeswitch.service])
if test -f /etc/os-release; then
DISTRO="$(source /etc/os-release && echo $ID$VERSION_ID)"
case "$DISTRO" in
*debian8*)
environmentfilelocation="default"
;;&
*centos7*)
environmentfilelocation="sysconfig"
;;&
*debian8*|*centos7*)
knowninit=false
if test -d /run/systemd/system; then
knowninit=true
AC_SUBST(DISTRO)
AC_SUBST(rundir)
AC_SUBST(environmentfilelocation)
AC_SUBST(bindir_expanded)
AC_CONFIG_FILES([build/startup/install_systemd.sh], [chmod +x build/startup/install_systemd.sh])
AC_CONFIG_FILES([build/startup/freeswitch.service])
fi
;;
*)
knowninit=false
;;
esac
fi
AM_CONDITIONAL([
SYSTEMD_INIT], [test x$systemd
init = xtrue])
AM_CONDITIONAL([
KNOWN_INIT], [test x$known
init = xtrue])
;;
esac
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论