将freeswitch加入CentOS7的systemctl

cd /usr/local/src/freeswitch/build

cp freeswitch.service /usr/lib/systemd/system/
cp freeswitch.sysconfig /etc/sysconfig/freeswitch

#在freeswitch.service文件中需要修改的内容
1. User修改为root
2. WorkingDirectory修改为/usr/local/freeswitch
3. ExecStart修改为/usr/local/freeswitch/bin/freeswitch

#开机启动
systemctl enable freeswitch.service
#Created symlink from /etc/systemd/system/multi-user.target.wants/freeswitch.service to /usr/lib/systemd/system/freeswitch.service.

systemctl start freeswitch

#修改freeswitch.service文件后重新加载
systemctl daemon-reload

#去除开机启动
systemctl disable freeswitch.service

[1]

posted on 2020-04-14 22:30  dream_bccb  阅读(361)  评论(0编辑  收藏  举报