[fix] Postinstall

This commit is contained in:
root 2014-05-25 22:48:31 +00:00
parent b50562085b
commit d53f84c3d7

View file

@ -213,15 +213,16 @@ app = Sammy('#main', function (sam) {
} else { } else {
if (uri === '/postinstall') { if (uri === '/postinstall') {
if (installing) { if (installing) {
interval = window.location.hostname === args.domain ? 20000 : 5000;
checkInstall = setInterval(function () { checkInstall = setInterval(function () {
c.checkInstall(function(isInstalled) { c.checkInstall(function(isInstalled) {
if (isInstalled || (window.location.hostname === args.domain && typeof isInstalled === 'undefined')) { if (isInstalled || (window.location.hostname === args.domain && typeof isInstalled === 'undefined')) {
c.flash('success', y18n.t('installation_complete')); c.flash('success', y18n.t('installation_complete'));
clearInterval(checkInstall); clearInterval(checkInstall);
document.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/#/login'; window.location.href = 'https://'+ window.location.hostname +'/yunohost/admin/';
} }
}); });
}, 6000); }, interval);
} else { } else {
c.flash('fail', y18n.t('error_occured')); c.flash('fail', y18n.t('error_occured'));
} }