From: <abe...@us...> - 2016-06-22 16:49:58
|
Revision: 7731 http://sourceforge.net/p/astlinux/code/7731 Author: abelbeck Date: 2016-06-22 16:49:55 +0000 (Wed, 22 Jun 2016) Log Message: ----------- fop2, automatically add the '--dbdir /etc/fop2' server option for FOP2 version 2.31+, Thanks to Michael Keuter for discovering this change Modified Paths: -------------- branches/1.0/package/asterisk-fop2/fop2.init Modified: branches/1.0/package/asterisk-fop2/fop2.init =================================================================== --- branches/1.0/package/asterisk-fop2/fop2.init 2016-06-20 20:57:51 UTC (rev 7730) +++ branches/1.0/package/asterisk-fop2/fop2.init 2016-06-22 16:49:55 UTC (rev 7731) @@ -24,6 +24,26 @@ # eliminate the 2x requirement, but would be bad practice if another PAR application was in use. TMPSIZEMAX=50000 +set_version_specific_options() +{ + local ver_str + + OPTIONS="" + + if [ ! -f "$PACKAGES_DIR/fop2/.sha1" ]; then + return + fi + + ver_str="$(sed -n -r -e 's:^.*/fop2-([^-]+)-.*$:\1:p' "$PACKAGES_DIR/fop2/.sha1")" + + # Set preferences database file location + case "$ver_str" in + 2.2[0-9]*) ;; + 2.30*) ;; + *) OPTIONS="$OPTIONS${OPTIONS:+ }--dbdir /etc/fop2" ;; + esac +} + init () { if [ ! -d /mnt/kd/fop2 ]; then @@ -40,7 +60,9 @@ if [ -f /etc/fop2/fop2.cfg ]; then echo "Starting Asterisk FOP2..." - $FOP2_SERVER -d -c /etc/fop2 -p $PIDFILE + set_version_specific_options + + $FOP2_SERVER -d -c /etc/fop2 -p $PIDFILE $OPTIONS fi } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |