...
The setup script example to update WCS to latest build and to configure CDN Edge server for WebRTc WebRTC playback
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#!/bin/bash # Stop WCS before reconfiguring PID="$(pgrep -f 'com.flashphoner.server.Server' | grep -v bash)" if [ -n "$PID" ]; then service webcallserver stop fi # Update WCS to the latest build (optionally, set to false if you don't) UPDATE=true if $UPDATE; then cd /tmp wget --timeout=10 --no-check-certificate https://flashphoner.com/download-wcs5.2-server.tar.gz -O wcs5-server.tar.gz if [ $? -eq 0 ]; then mkdir -p FlashphonerWebCallServer-5.2-latest && tar xzf wcs5-server.tar.gz -C FlashphonerWebCallServer-5.2-latest --strip-components 1 cd FlashphonerWebCallServer-5.2-latest chmod +x install.sh ./install.sh -silent cd .. rm -rf FlashphonerWebCallServer-5.2-latest wcs5-server.tar.gz fi fi # Configuration setup WCS_CONFIG=/usr/local/FlashphonerWebCallServer/conf/flashphoner.properties JVM_CONFIG=/usr/local/FlashphonerWebCallServer/conf/wcs-core.properties #CDN settings CDN_ROLE=edge CDN_IP=0.0.0.0 CDN_POINT_OF_ENTRY=172.31.43.82 echo -e "\ncdn_enabled=true" >> $WCS_CONFIG echo -e "\ncdn_ip=$CDN_IP" >> $WCS_CONFIG echo -e "\ncdn_role=$CDN_ROLE" >> $WCS_CONFIG echo -e "\ncdn_point_of_entry=$CDN_POINT_OF_ENTRY" >> $WCS_CONFIG echo -e "\ncdn_nodes_resolve_ip=false" >> $WCS_CONFIG # Configure heap settings HEAP_SIZE=512m sed -i -e "s/^\(-Xmx\).*\$/\1$HEAP_SIZE/" $JVM_CONFIG # Start WCS after reconfiguring PID="$(pgrep -f 'com.flashphoner.server.Server' | grep -v bash)" if [ -n "$PID" ]; then service webcallserver restart else service webcallserver start fi # Disable internal firewall, ports are allowed/blocked on security group level iptables -F |
...