diff --git a/root/etc/e-smith/templates/var/lib/pydio/plugins/conf.serial/plugins_configs.ser/10All b/root/etc/e-smith/templates/var/lib/pydio/plugins/conf.serial/plugins_configs.ser/10All index ab029ad..d1fdf73 100644 --- a/root/etc/e-smith/templates/var/lib/pydio/plugins/conf.serial/plugins_configs.ser/10All +++ b/root/etc/e-smith/templates/var/lib/pydio/plugins/conf.serial/plugins_configs.ser/10All @@ -1,97 +1,76 @@ { -use PHP::Serialization qw(serialize); +use PHP::Serialization qw(serialize unserialize); my $data; -$data->{'core.uploader'}->{'UPLOAD_MAX_SIZE'} = "0"; -$data->{'core.uploader'}->{'UPLOAD_MAX_NUMBER'} = "50"; -$data->{'gui.ajax'}->{'CUSTOM_WELCOME_MESSAGE'} = $pydio{'WelcomMessage'} || 'Pydio'; -$data->{'core.ajaxplorer'}->{'WEBMASTER_EMAIL'} = 'admin@'.$DomainName; -$data->{'core.ajaxplorer'}->{'AJXP_TMP_DIR'} = '/var/lib/pydio/tmp'; -$data->{'core.ajaxplorer'}->{'DEFAULT_LANGUAGE'} = $pydio{'DefaultLanguage'} || 'en'; -$data->{'core.ajaxplorer'}->{'APPLICATION_TITLE'} = $pydio{'Title'} || 'Pydio'; -$data->{'core.ajaxplorer'}->{'CMDLINE_ACTIVE'} = '__true__'; -$data->{'core.ajaxplorer'}->{'CLI_PHP'} = '/usr/bin/php'; +if ((($pydio->prop('ManualConf') || 'disabled') eq 'enabled') && open CONF, "/var/lib/pydio/plugins/conf.serial/plugins_configs.ser"){ + $data = ; + close CONF; + $data = unserialize ($data); +} + +$data->{'core.uploader'}->{'UPLOAD_MAX_SIZE'} ||= "0"; +$data->{'core.uploader'}->{'UPLOAD_MAX_NUMBER'} ||= "50"; +$data->{'gui.ajax'}->{'CUSTOM_WELCOME_MESSAGE'} ||= $pydio{'WelcomMessage'} || 'Pydio'; +$data->{'core.ajaxplorer'}->{'WEBMASTER_EMAIL'} ||= 'admin@'.$DomainName; +$data->{'core.ajaxplorer'}->{'AJXP_TMP_DIR'} ||= '/var/lib/pydio/tmp'; +$data->{'core.ajaxplorer'}->{'DEFAULT_LANGUAGE'} ||= $pydio{'DefaultLanguage'} || 'en'; +$data->{'core.ajaxplorer'}->{'APPLICATION_TITLE'} ||= $pydio{'Title'} || 'Pydio'; +$data->{'core.ajaxplorer'}->{'CMDLINE_ACTIVE'} ||= '__true__'; +$data->{'core.ajaxplorer'}->{'CLI_PHP'} ||= '/usr/bin/php'; if (($pydio{'PublicShares'} || 'enabled') eq 'enabled'){ - $data->{'core.ajaxplorer'}->{'PUBLIC_DOWNLOAD_FOLDER'} = '/var/lib/pydio/public'; - $data->{'core.ajaxplorer'}->{'PUBLIC_DOWNLOAD_URL'} = $pydio{'PublicDownloadUrl'} || "http://$SystemName.$DomainName/ajxppub"; + $data->{'core.ajaxplorer'}->{'PUBLIC_DOWNLOAD_FOLDER'} ||= '/var/lib/pydio/public'; + $data->{'core.ajaxplorer'}->{'PUBLIC_DOWNLOAD_URL'} ||= $pydio{'PublicDownloadUrl'} || "http://$SystemName.$DomainName/ajxppub"; } -$data->{'core.log'} = { - 'UNIQUE_PLUGIN_INSTANCE' => { - 'LOG_FILE_NAME' => 'log_date(\'m-d-y\').txt', - 'LOG_PATH' => '/var/log/pydio/', - 'instance_name' => 'log.text', - 'group_switch_value' => 'log.text', - 'LOG_CHMOD' => 770 - } -}; +$data->{'core.log'}->{'UNIQUE_PLUGIN_INSTANCE'}->{'LOG_FILE_NAME'} ||= 'log_date(\'m-d-y\').txt'; +$data->{'core.log'}->{'UNIQUE_PLUGIN_INSTANCE'}->{'LOG_PATH'} ||= '/var/log/pydio/'; +$data->{'core.log'}->{'UNIQUE_PLUGIN_INSTANCE'}->{'instance_name'} ||= 'log.text'; +$data->{'core.log'}->{'UNIQUE_PLUGIN_INSTANCE'}->{'group_switch_value'} ||= 'log.text'; +$data->{'core.log'}->{'UNIQUE_PLUGIN_INSTANCE'}->{'LOG_CHMOD'} ||= '770'; -$data->{'access.fs'} = { - 'HIDE_EXTENSIONS' => 'ser', - 'PROBE_REAL_SIZE' => '__true__', - 'USE_POSIX' => '__true__', -}; +$data->{'access.fs'}->{'HIDE_EXTENSIONS'} ||= 'ser'; +$data->{'access.fs'}->{'PROBE_REAL_SIZE'} ||= '__true__'; +$data->{'access.fs'}->{'USE_POSIX'} ||= '__true__'; -$data->{'core.notifications'} = { - 'UNIQUE_FEED_INSTANCE' => { - 'instance_name' => 'feed.sql', - 'group_switch_value' => 'feed.sql', - 'SQL_DRIVER' => { - 'group_switch_value' => 'core', - 'core_driver' => 'core' - } - }, - 'USER_EVENTS' => '__true__' -}; +$data->{'core.notifications'}->{'UNIQUE_FEED_INSTANCE'}->{'instance_name'} ||= 'feed.sql'; +$data->{'core.notifications'}->{'UNIQUE_FEED_INSTANCE'}->{'group_switch_value'} ||= 'feed.sql'; +$data->{'core.notifications'}->{'UNIQUE_FEED_INSTANCE'}->{'SQL_DRIVER'}->{'group_switch_value'} ||= 'core'; +$data->{'core.notifications'}->{'UNIQUE_FEED_INSTANCE'}->{'SQL_DRIVER'}->{'core_driver'} ||= 'core'; +$data->{'core.notifications'}->{'USER_EVENTS'} ||= '__true__'; -$data->{'core.mailer'} = { - 'FROM' => 'pydio@'.$DomainName, - 'BODY_LAYOUT' => 'AJXP_MAIL_BODY', - 'UNIQUE_MAILER_INSTANCE' => { - 'MAILER' => 'sendmail', - 'instance_name' => 'mailer.phpmailer-lite', - 'group_switch_value' => 'mailer.phpmailer-lite' - }, - 'FROM_NAME' => 'Pydio', - 'SUBJECT_APPEND' => '', - 'SUBJECT_PREPEND' => '' -}; +$data->{'core.mailer'}->{'FROM'} ||= 'pydio@'.$DomainName; +$data->{'core.mailer'}->{'BODY_LAYOUT'} ||= 'AJXP_MAIL_BODY'; +$data->{'core.mailer'}->{'FROM_NAME'} ||= 'Pydio'; +$data->{'core.mailer'}->{'SUBJECT_APPEND'} ||= ''; +$data->{'core.mailer'}->{'SUBJECT_PREPEND'} ||= ''; +$data->{'core.mailer'}->{'UNIQUE_MAILER_INSTANCE'}->{'MAILER'} ||= 'sendmail'; +$data->{'core.mailer'}->{'UNIQUE_MAILER_INSTANCE'}->{'instance_name'} = 'mailer.phpmailer-lite'; +$data->{'core.mailer'}->{'UNIQUE_MAILER_INSTANCE'}->{'group_switch_value'} = 'mailer.phpmailer-lite'; -$data->{'action.powerfs'} = { - 'AJXP_PLUGIN_ENABLED' => '__true__' -}; +$data->{'action.powerfs'}->{'AJXP_PLUGIN_ENABLED'} ||= '__true__'; -$data->{'index.lucene'} = { - 'QUERY_ANALYSER' => 'utf8num_insensitive', - 'AJXP_PLUGIN_ENABLED' => '__true__', - 'WILDCARD_LIMITATION' => '0', - 'PDFTOTEXT' => '/usr/bin/pydiopdftotext', - 'PARSE_CONTENT_HTML' => 'html,htm', - 'PARSE_CONTENT_TXT' => 'txt', - 'PARSE_CONTENT_MAX_SIZE' => '20000000', - 'UNOCONV' => '/usr/bin/unoconv --server 127.0.0.1', - 'index_content' => '__true__' -}; +$data->{'index.lucene'}->{'QUERY_ANALYSER'} ||= 'utf8num_insensitive'; +$data->{'index.lucene'}->{'AJXP_PLUGIN_ENABLED'} ||= '__true__'; +$data->{'index.lucene'}->{'WILDCARD_LIMITATION'} ||= '0'; +$data->{'index.lucene'}->{'PDFTOTEXT'} ||= '/usr/bin/pydiopdftotext'; +$data->{'index.lucene'}->{'PARSE_CONTENT_HTML'} ||= 'html,htm'; +$data->{'index.lucene'}->{'PARSE_CONTENT_MAX_SIZE'} ||= '20000000'; +$data->{'index.lucene'}->{'UNOCONV'} ||= '/usr/bin/unoconv --server 127.0.0.1'; +$data->{'index.lucene'}->{'index_content'} ||= '__true__'; -$data->{'editor.imagick'} = { - 'IM_VIEWER_QUALITY' => '90', - 'AJXP_PLUGIN_ENABLED' => '__true__', - 'ONTHEFLY_THRESHOLD' => '3', - 'ADDITIONAL_ENV_PATH' => '', - 'IM_THUMB_QUALITY' => '65', - 'IMAGE_MAGICK_CONVERT' => '/usr/bin/convert', - 'UNOCONV' => 'HOME=/var/cache/ooo /usr/bin/unoconv --server 127.0.0.1', - 'IM_CUSTOM_OPTIONS' => '-strip' -}; +$data->{'editor.imagick'}->{'IM_VIEWER_QUALITY'} ||= '90'; +$data->{'editor.imagick'}->{'AJXP_PLUGIN_ENABLED'} ||= '__true__'; +$data->{'editor.imagick'}->{'ONTHEFLY_THRESHOLD'} ||= '3'; +$data->{'editor.imagick'}->{'ADDITIONAL_ENV_PATH'} ||= ''; +$data->{'editor.imagick'}->{'IM_THUMB_QUALITY'} ||= '65'; +$data->{'editor.imagick'}->{'IMAGE_MAGICK_CONVERT'} ||= '/usr/bin/convert'; +$data->{'editor.imagick'}->{'UNOCONV'} ||= 'HOME=/var/cache/ooo /usr/bin/unoconv --server 127.0.0.1'; +$data->{'editor.imagick'}->{'IM_CUSTOM_OPTIONS'} ||= '-strip'; -$data->{'editor.ckeditor'} = { - 'AJXP_PLUGIN_ENABLED' => '__true__' -}; +$data->{'editor.ckeditor'}->{'AJXP_PLUGIN_ENABLED'} ||= '__true__'; -$data->{'action.quicksend'} = { - 'AJXP_PLUGIN_ENABLED' => '__true__' -}; +$data->{'action.quicksend'}->{'AJXP_PLUGIN_ENABLED'} ||= '__true__'; $data = serialize($data); # PHP::Serialization has now way to @@ -100,4 +79,4 @@ $data = serialize($data); $data =~ s/s:8:"__true__";/b:1;/g; $OUT = $data; -} +} \ No newline at end of file