标签:string env res sys script nbsp sts 安装 启动
程序安装在/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
标签:string env res sys script nbsp sts 安装 启动
原文地址:https://www.cnblogs.com/aimod/p/9093606.html