Various fixes

This commit is contained in:
nemunaire 2015-01-16 23:53:13 +01:00 committed by Nemunaire
parent 05808f5543
commit e1abba602a
3 changed files with 8 additions and 3 deletions

View File

@ -8,7 +8,7 @@ cd `dirname "$0"`
# Creating directory and set permissions
mkdir -p ${BASEDIR}/logs ${BASEDIR}/onyx/log
chown -R www-data:www-data ${BASEDIR}/shared ${BASEDIR}/pki/openssl.cnf ${BASEDIR}/PKI ${BASEDIR}/onyx/log
chown -R www-data:www-data ${BASEDIR}/shared ${BASEDIR}/pki ${BASEDIR}/PKI ${BASEDIR}/onyx/log
chown -R ${SYNCHRO_USER}:www-data ${BASEDIR}/submission ${BASEDIR}/logs ${BASEDIR}/out ${BASEDIR}/shared/nginx-teams.conf
chmod 770 ${BASEDIR}/submission
chown ${SYNCHRO_USER} ${BASEDIR}/.ssh/id_rsa

View File

@ -87,12 +87,13 @@ if (!empty($_FILES["inputFile"]['tmp_name']))
$output .= new_client($team->team_name, $misc_dir);
}
}
$template->assign("output", $output);
if (file_exists("$misc_dir/PKI/teams.pass"))
{
$output .= file_get_contents("$misc_dir/PKI/teams.pass");
shell_exec("sync");
$template->assign("pass", file_get_contents("$misc_dir/PKI/teams.pass"));
unlink("$misc_dir/PKI/teams.pass");
}
$template->assign("output", $output);
}
else
$error = "Aucune team trouvée";

View File

@ -11,6 +11,10 @@
<button type="submit" class="btn btn-primary">Importer</button>
</form>
{if isset($pass)}
<h2>Pass</h2>
<pre>{$pass}</pre>
{/if}
{if isset($output)}
<h2>Output</h2>
<pre>{$output}</pre>