Skip to content
Snippets Groups Projects
Verified Commit 4bd42da0 authored by David Beniamine's avatar David Beniamine
Browse files

Alert forbidden actions

parent 69bca546
No related branches found
No related tags found
No related merge requests found
......@@ -85,6 +85,11 @@ do
# Extract the pertinent part of the log
awk 'BEGIN{IN=0} /Begin host/{if($4=="'$name'"){IN=1}} {if(IN){print $0}} /End host/{if($4=="'$name'"){IN=0}}' \
$logfile > $tempfile
if [ ! -s $tempfile ]
then
# Log file is empty, this happens when we are starting an upgrade on a specific host
cp $logfile $tempfile
fi
answer $tempfile
rm $tempfile
fi
......
......@@ -126,7 +126,7 @@ if(!isset($action)){
<input type="submit" value="Mise à jour config" title="Mettre à jour">
</form>
<form action="index.php" method="post">
<input type="hidden" name="action" value="upgradeAPT">
<input type="hidden" name="action" value="upgradeApt">
<input type="hidden" name="name" value="<?php echo $entry[2]; ?>">
<input type="submit" value="Mise à jour config + APT" title="Mettre à jour + apt">
</form>
......@@ -258,8 +258,15 @@ if(!isset($action)){
<input type="submit" value="Rafraichir les logs" title="Rafraichir les logs">
</form>
<?
}else{
echo "<p><strong>Action '$action' interdite !</strong></p>";
}
}
?>
<form action="index.php" method="post">
<input type="submit" value="Retour à l'accueil" title="Retour à l'accueil">
</form>
<?php
}
?>
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment