浏览代码

Fix some errors for Centos platform (#410)

* Fix bugs

* Update conf-copy.sh

Update fusionpbx template path

* Update package-release.sh

Fix the issue of the files.freeswitch.org site not available

* Fix bug
tao_ssh 1 年之前
父节点
当前提交
7e0d874857
共有 3 个文件被更改,包括 10 次插入3 次删除
  1. 2 1
      centos/resources/finish.sh
  2. 1 1
      centos/resources/switch/conf-copy.sh
  3. 7 1
      centos/resources/switch/package-release.sh

+ 2 - 1
centos/resources/finish.sh

@@ -23,7 +23,8 @@ sudo -u postgres /usr/bin/psql -c "ALTER USER fusionpbx WITH PASSWORD '$database
 sudo -u postgres /usr/bin/psql -c "ALTER USER freeswitch WITH PASSWORD '$database_password';"
 
 #add the config.conf
-cp fusionpbx/config.conf /etc/fusionpbx
+mkdir -p /etc/fusionpbx/
+cp fusionpbx/config.conf /etc/fusionpbx/
 sed -i /etc/fusionpbx/config.conf -e s:"{database_host}:$database_host:"
 sed -i /etc/fusionpbx/config.conf -e s:"{database_name}:$database_name:"
 sed -i /etc/fusionpbx/config.conf -e s:"{database_username}:$database_username:"

+ 1 - 1
centos/resources/switch/conf-copy.sh

@@ -3,4 +3,4 @@
 #copy the conf directory
 mv /etc/freeswitch /etc/freeswitch.orig
 mkdir /etc/freeswitch
-cp -R /var/www/fusionpbx/resources/templates/conf/* /etc/freeswitch
+cp -R /var/www/fusionpbx/app/switch/resources/conf/* /etc/freeswitch

+ 7 - 1
centos/resources/switch/package-release.sh

@@ -14,7 +14,13 @@ verbose "Installing FreeSWITCH"
 yum -y install memcached curl gdb
 
 #install freeswitch packages
-yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
+#yum install -y https://files.freeswitch.org/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
+echo "signalwire" > /etc/yum/vars/signalwireusername
+echo 'please get your token from this site: https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Installation/HOWTO-Create-a-SignalWire-Personal-Access-Token_67240087/#attachments'
+echo "please enter your token:" 
+read token
+echo $token > /etc/yum/vars/signalwiretoken
+yum install -y https://$(< /etc/yum/vars/signalwireusername):$(< /etc/yum/vars/signalwiretoken)@freeswitch.signalwire.com/repo/yum/centos-release/freeswitch-release-repo-0-1.noarch.rpm epel-release
 yum install -y freeswitch-config-vanilla freeswitch-lang-* freeswitch-sounds-* freeswitch-lua freeswitch-xml-cdr
 
 #remove the music package to protect music on hold from package updates