Allow ManualConf also for bootstrap.json

tags/0.2.5_el5
Daniel Berteaud 11 years ago
parent 84c87e7418
commit e1e1e69d32
  1. 117
      root/etc/e-smith/templates/var/lib/pydio/plugins/boot.conf/bootstrap.json/10All

@ -8,72 +8,57 @@ my $url = $pydio{'LogoutUrl'} || '';
my $createUser = $pydio{'ShareCreateUser'} || 'disabled'; my $createUser = $pydio{'ShareCreateUser'} || 'disabled';
$createUser = ($createUser eq 'enabled') ? JSON::true : JSON::false; $createUser = ($createUser eq 'enabled') ? JSON::true : JSON::false;
my $data = { my $data;
'core.conf' => {
'USERS_LIST_COMPLETE_MIN_CHARS' => '3', if ((($pydio->prop('ManualConf') || 'disabled') eq 'enabled') && open CONF, "/var/lib/pydio/plugins/conf.serial/boot.conf/bootstrap.json"){
'SKIP_USER_HISTORY' => JSON::true, $data = <CONF>;
'DIBI_PRECONFIGURATION' => { close CONF;
'mysql_username' => $dbu, $data = from_json($data);
'mysql_password' => $dbp, }
'mysql_driver' => 'mysql',
'group_switch_value' => 'mysql', $data->{'core.conf'}->{'USERS_LIST_COMPLETE_MIN_CHARS'} ||= '3';
'mysql_database' => $dbn, $data->{'core.conf'}->{'SKIP_USER_HISTORY'} ||= JSON::true;
'mysql_host' => 'localhost' $data->{'core.conf'}->{'USER_CREATE_REPOSITORY'} ||= JSON::false;
}, $data->{'core.conf'}->{'SAVE_GUEST_PREFERENCES'} ||= JSON::false;
'UNIQUE_INSTANCE_CONFIG' => { $data->{'core.conf'}->{'USERS_LIST_HIDE_LOGIN'} ||= JSON::false;
'FAST_CHECKS' => JSON::false, $data->{'core.conf'}->{'USERS_LIST_COMPLETE_LIMIT'} ||= '20';
'ROLES_FILEPATH' => '/var/lib/pydio/plugins/auth.serial/roles.ser', $data->{'core.conf'}->{'ALLOW_CROSSUSERS_SHARING'} ||= JSON::true;
'USERS_DIRPATH' => '/var/lib/pydio/plugins/auth.serial', $data->{'core.conf'}->{'USER_CREATE_USERS'} ||= $createUser;
'instance_name' => 'conf.serial', $data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'mysql_username'} ||= $dbu;
'group_switch_value' => 'conf.serial', $data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'mysql_password'} ||= $dbp;
'REPOSITORIES_FILEPATH' => '/var/lib/pydio/plugins/conf.serial/repo.ser' $data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'mysql_driver'} ||= 'mysql';
}, $data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'group_switch_value'} ||= 'mysql';
'USER_CREATE_REPOSITORY' => JSON::false, $data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'mysql_database'} ||= $dbn;
'SAVE_GUEST_PREFERENCES' => JSON::false, $data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'mysql_host'} ||= 'localhost';
'USERS_LIST_HIDE_LOGIN' => JSON::false,
'USERS_LIST_COMPLETE_LIMIT' => '20', $data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'LOGOUT_URL'} ||= $url;
'ALLOW_CROSSUSERS_SHARING' => JSON::true, $data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'LOGIN_REDIRECT'} ||= '';
'USER_CREATE_USERS' => $createUser $data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'instance_name'} ||= 'auth.basic_http';
}, $data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'AJXP_ADMIN_LOGIN'} ||= '';
'core.auth' => { $data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'TRANSMIT_CLEAR_PASS'} ||= JSON::true;
'MASTER_INSTANCE_CONFIG' => { $data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'AUTOCREATE_AJXPUSER'} ||= JSON::false;
'LOGOUT_URL' => $url, $data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'group_switch_value'} ||= 'auth.basic_http';
'LOGIN_REDIRECT' => '', $data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'USERS_FILEPATH'} ||= '/var/lib/pydio/plugins/auth.serial/users.ser';
'instance_name' => 'auth.basic_http', $data->{'core.auth'}->{'MULTI_MODE'}->{'instance_name'} ||= 'MASTER_SLAVE';
'AJXP_ADMIN_LOGIN' => '', $data->{'core.auth'}->{'MULTI_MODE'}->{'CACHE_MASTER_USERS_TO_SLAVE'} ||= JSON::false;
'TRANSMIT_CLEAR_PASS' => JSON::true, $data->{'core.auth'}->{'MULTI_MODE'}->{'group_switch_value'} ||= 'MASTER_SLAVE';
'AUTOCREATE_AJXPUSER' => JSON::false, $data->{'core.auth'}->{'MULTI_USER_BASE_DRIVER'} ||= 'slave';
'group_switch_value' => 'auth.basic_http', $data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'instance_name'} ||= 'auth.serial';
'USERS_FILEPATH' => '/var/lib/pydio/plugins/auth.serial/users.ser' $data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'USERS_FILEPATH'} ||= '/var/lib/pydio/plugins/auth.serial/guests.ser';
}, $data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'TRANSMIT_CLEAR_PASS'} ||= JSON::true;
'MULTI_MODE' => { $data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'LOGIN_REDIRECT'} ||= '';
'instance_name' => 'MASTER_SLAVE', $data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'FAST_CHECKS'} ||= JSON::false;
'CACHE_MASTER_USERS_TO_SLAVE' => JSON::false, $data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'AUTOCREATE_AJXPUSER'} ||= JSON::false;
'group_switch_value' => 'MASTER_SLAVE' $data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'AJXP_ADMIN_LOGIN'} ||= '';
}, $data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'group_switch_value'} ||= 'auth.serial';
'MULTI_USER_BASE_DRIVER' => 'slave', $data->{'core.auth'}->{'SECURE_LOGIN_FORM'} ||= JSON::false;
'SLAVE_INSTANCE_CONFIG' => { $data->{'core.auth'}->{'SESSION_SET_CREDENTIALS'} ||= JSON::false;
'instance_name' => 'auth.serial', $data->{'core.auth'}->{'MULTI_MODE'}->{'instance_name'} ||= 'MASTER_SLAVE';
'USERS_FILEPATH' => '/var/lib/pydio/plugins/auth.serial/guests.ser', $data->{'core.auth'}->{'MULTI_MODE'}->{'group_switch_value'} ||= 'MASTER_SLAVE';
'TRANSMIT_CLEAR_PASS' => JSON::true, $data->{'core.auth'}->{'CASE_SENSITIVE'} ||= JSON::true;
'LOGIN_REDIRECT' => '', $data->{'core.auth'}->{'ENABLE_USERS'} ||= JSON::true;
'FAST_CHECKS' => JSON::false, $data->{'core.auth'}->{'ALLOW_GUEST_BROWSING'} ||= JSON::false;
'AUTOCREATE_AJXPUSER' => JSON::false, $data->{'core.auth'}->{'PASSWORD_MINLENGTH'} ||= '4';
'AJXP_ADMIN_LOGIN' => '',
'group_switch_value' => 'auth.serial'
},
'SECURE_LOGIN_FORM' => JSON::false,
'SESSION_SET_CREDENTIALS' => JSON::false,
'MULTI_MODE' => {
'instance_name' => 'MASTER_SLAVE',
'group_switch_value' => 'MASTER_SLAVE'
},
'CASE_SENSITIVE' => JSON::true,
'ENABLE_USERS' => JSON::true,
'ALLOW_GUEST_BROWSING' => JSON::false,
'PASSWORD_MINLENGTH' => '4'
}
};
$OUT = to_json($data, {pretty => 1}); $OUT = to_json($data, {pretty => 1});
} }

Loading…
Cancel
Save