diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/access mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/access --- smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/access 1970-01-01 01:00:00.000000000 +0100 +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/access 2009-04-29 17:18:27.000000000 +0200 @@ -0,0 +1 @@ +private diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/status mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/status --- smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/status 1970-01-01 01:00:00.000000000 +0100 +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/status 2009-04-29 17:18:15.000000000 +0200 @@ -0,0 +1 @@ +enabled diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/TCPPort mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/TCPPort --- smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/TCPPort 1970-01-01 01:00:00.000000000 +0100 +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/fop/TCPPort 2009-04-29 17:21:43.000000000 +0200 @@ -0,0 +1 @@ +4445 diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/Fop mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/Fop --- smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/Fop 2008-09-20 02:04:31.000000000 +0200 +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/defaults/freepbx/Fop 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -enabled diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/migrate/freepbx mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/migrate/freepbx --- smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/migrate/freepbx 2008-08-13 16:33:39.000000000 +0200 +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/db/configuration/migrate/freepbx 2009-04-29 17:35:17.000000000 +0200 @@ -4,10 +4,19 @@ my $dbpass = $freepbx->prop('DbPassword') || $freepbx->set_prop('DbPassword', `/usr/bin/openssl rand -base64 40 | /usr/bin/tr -c -d '[:graph:]'`); -my $foppass = $freepbx->prop('FopPassword') || - $freepbx->set_prop('FopPassword', `/usr/bin/openssl rand -base64 5 | /usr/bin/tr -c -d '[:alnum:]'`); - my $managerpass = $freepbx->prop('ManagerPassword') || $freepbx->set_prop('ManagerPassword', `/usr/bin/openssl rand -base64 10 | /usr/bin/tr -c -d '[:alnum:]'`); +my $fop = $DB->get('fop') || $DB->new_record('fop', {type => 'service'}); + +my $foppass = $fop->prop('Password') || ''; +if ($foppass eq ''){ + $fopass = $freepbx->prop('FopPassword') || ''; + if ($foppass eq ''){ + $foppass = `/usr/bin/openssl rand -base64 5 | /usr/bin/tr -c -d '[:alnum:]'`; + } } +$fop->set_prop('Password', $foppass); + +} + diff -Nur -x '*.orig' -x '*.rej' smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/amportal.conf/25fop mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/amportal.conf/25fop --- smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/amportal.conf/25fop 2009-04-29 17:38:05.000000000 +0200 +++ mezzanine_patched_smeserver-freepbx-0.1/root/etc/e-smith/templates/etc/amportal.conf/25fop 2009-04-29 17:15:35.000000000 +0200 @@ -3,14 +3,14 @@ FOPWEBROOT=/opt/freepbx/panel # FOPPASSWORD: the secret code for performing transfers and hangups in the Flash Operator Panel -FOPPASSWORD={${'freepbx'}{'FopPassword'} || 'passw0rd';} +FOPPASSWORD={${'fop'}{'Password'} || 'passw0rd';} # FOPSORT: FOP should sort extensions by Last Name [lastname] or by Extension [extension] FOPSORT=extension # FOPRUN: set to true if you want FOP started by freepbx_engine (amportal_start), false otherwise -FOPRUN={((${'freepbx'}{'Fop'} || 'disabled') eq 'enabled') ? 'true': 'false';} +FOPRUN={((${'fop'}{'status'} || 'disabled') eq 'enabled') ? 'true': 'false';} -FOPDISABLE={((${'freepbx'}{'Fop'} || 'disabled') eq 'enabled') ? 'false': 'true';} +FOPDISABLE={((${'fop'}{'status'} || 'disabled') eq 'enabled') ? 'false': 'true';} # Disables FOP in interface and retrieve_conf. Usefull for sqlite3 or if you don't want FOP.