Created
August 8, 2012 19:04
-
-
Save avimar/3297645 to your computer and use it in GitHub Desktop.
FreeSWITCH Salt install file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
freeswitch-build: | |
pkg: | |
- installed | |
- names: | |
- build-essential | |
- curl | |
- wget | |
- autoconf | |
- automake | |
- libtool | |
- make | |
- libssl-dev | |
- libncurses5 | |
- libncurses5-dev | |
- bison | |
- uuid-dev | |
- libjpeg62-dev #spandsp. newer 8 didn't seem to install. | |
- pkg-config | |
- unixodbc | |
- unixodbc-dev | |
- libmyodbc #mysql odbc | |
- libdb-dev | |
- libcurl4-openssl-dev #for xml_curl | |
- libtiff-tools #for fax? | |
- libtiff4-dev #for fax? | |
require: | |
- pkg: git | |
/usr/local/freeswitch: | |
file.directory: | |
- user: freeswitch | |
- group: daemon | |
- mode: 750 # what about sticky? cd /usr/local/ && find freeswitch -type d -exec /bin/chmod u=rwx,g=srx,o= {} \; | |
- makedirs: True | |
- recurse: | |
- user | |
- group | |
fs-cli-link: | |
file.symlink: | |
- name: /usr/local/bin/fs_cli | |
- target: /usr/local/freeswitch/bin/fs_cli | |
- force: True | |
freeswitch-install-script: | |
file.managed: | |
- name: /usr/src/freeswitch-install.sh | |
- source: salt://freeswitch/freeswitch-install.sh | |
- mode: 755 | |
- makedirs: True | |
- user: root | |
- group: root | |
freeswitch-user: | |
user.present: | |
- name: freeswitch | |
- uid: 105 | |
- gid: 1 | |
- home: /var/www/ | |
- shell: /bin/false | |
- groups: | |
- www-data | |
- require: | |
- group: www-data | |
group.present: | |
- name: www-data | |
- gid: 33 | |
www-data: | |
user.present: | |
- name: www-data | |
- uid: 33 | |
- gid: 33 | |
- home: /var/www/ | |
- shell: /bin/false | |
- groups: | |
- daemon | |
freeswitch-source: | |
git.latest: | |
- target: /usr/src/freeswitch | |
- name: git://git.freeswitch.org/freeswitch.git | |
freeswitch-contrib-source: | |
git.latest: | |
- target: /usr/src/freeswitch/contrib | |
- name: git://git.freeswitch.org/freeswitch-contrib.git | |
- require: | |
- git: freeswitch-source | |
---------- | |
build.sls | |
---------- | |
install: | |
cmd.run: | |
- name: /usr/src/freeswitch-install.sh | |
- cwd: /usr/src/freeswitch | |
- order: last | |
- require: | |
- file: freeswitch-install-script | |
- git: freeswitch-source | |
- git: freeswitch-contrib-source | |
----------- | |
freeswitch-install.sh | |
----------- | |
#!/bin/bash | |
CORES=$(/bin/grep processor -c /proc/cpuinfo) | |
cd /usr/src/freeswitch | |
if [ $CORES -gt 1 ]; then | |
time /usr/src/freeswitch/bootstrap.sh -j | |
else | |
time /usr/src/freeswitch/bootstrap.sh | |
fi | |
time /usr/src/freeswitch/configure -C | |
time make -j $CORES core | |
time make -j $CORES | |
time make install | |
time make sounds-install | |
time make moh-install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment