首页 > 其他 > 详细

CentOS7系统上设置freeswitch的自启动

时间:2018-05-26 17:38:12      阅读:967      评论:0      收藏:0      [点我收藏+]

程序安装在/usr/local/目录,用户是root

1、在目录/usr/lib/systemd/system下创建文件astswitch.service,内容如下

vi /usr/lib/systemd/system/astswitch.service

[Unit]
Description=AstSWITCH
After=syslog.target network.target
After=postgresql-9.6.service nginx.service

[Service]
User=root
EnvironmentFile=-/etc/sysconfig/astswitch
WorkingDirectory=/usr/local/freeswitch
ExecStart=/usr/local/freeswitch/bin/freeswitch -nc -nf $FREESWITCH_PARAMS
ExecReload=/usr/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target

2、在目录/etc/sysconfig下创建文件astswitch,内容如下:

vi /etc/sysconfig/astswitch

## Type: string
## Default: ""
## Config: ""
## ServiceRestart: astswitch
#
# if not empty: parameters for astswitch
#
FREESWITCH_PARAMS=""

3、修改
cd /usr/local/
chown -R root:root freeswitch
chmod -R g+w freeswitch

4、启动
systemctl enable astswitch.service
systemctl start astswitch.service

 

CentOS7系统上设置freeswitch的自启动

原文:https://www.cnblogs.com/aimod/p/9093606.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!