corrections pages maintenance
This commit is contained in:
parent
0440d0b433
commit
b8a04561fa
3 changed files with 9 additions and 11 deletions
|
@ -13,7 +13,7 @@ while true; do
|
|||
|
||||
for i in $(ls $VHOSTS_DIR); do
|
||||
LISTE_VHOSTS="$LISTE_VHOSTS $i"
|
||||
if [ -f "$MAINTENANCE_DIR/$i" ]; then
|
||||
if [ -f "$MAINTENANCE_DIR/$i.html" ]; then
|
||||
LISTE_VHOSTS="$LISTE_VHOSTS (maintenance)"
|
||||
else
|
||||
LISTE_VHOSTS="$LISTE_VHOSTS (normal)"
|
||||
|
@ -26,12 +26,10 @@ while true; do
|
|||
rm $TMP
|
||||
|
||||
if [ "$ERR" == "0" ]; then
|
||||
if [ -f "$MAINTENANCE_DIR/$VHOST" ]; then
|
||||
rm $MAINTENANCE_DIR/$VHOST
|
||||
# dialog --title "Gestion page de maintenance" --msgbox "$VHOST n'est plus en maintenance" 0 0
|
||||
if [ -f "$MAINTENANCE_DIR/$VHOST.html" ]; then
|
||||
rm $MAINTENANCE_DIR/$VHOST.html
|
||||
else
|
||||
ln -s $MAINTENANCE_DIR/maintenance-generique.html $MAINTENANCE_DIR/$VHOST
|
||||
# dialog --title "Gestion page de maintenance" --msgbox "$VHOST est mis en maintenance" 0 0
|
||||
ln -s $MAINTENANCE_DIR/maintenance-generique.html $MAINTENANCE_DIR/$VHOST.html
|
||||
fi
|
||||
else
|
||||
exit
|
||||
|
|
|
@ -172,12 +172,12 @@ SecCookieFormat 0
|
|||
</Location>
|
||||
|
||||
# Si on est en maintenance
|
||||
<If "-f %{DOCUMENT_ROOT} . '/maintenance/$vhostFQDN'">
|
||||
<If "-f %{DOCUMENT_ROOT} . '/rp_maintenance/$vhostFQDN.html'">
|
||||
RewriteCond %{REMOTE_ADDR} !127.0.0.1
|
||||
RewriteCond %{REQUEST_URI} !^/rp_ressources/*
|
||||
RewriteCond %{REQUEST_URI} !^/rp_maintenance/*
|
||||
RewriteCond %{HTTP_COOKIE} !rp_acces_maintenance=([^;]+)
|
||||
RewriteRule ^.*$ %{DOCUMENT_ROOT}/maintenance/$vhostFQDN
|
||||
RewriteRule ^.*$ %{DOCUMENT_ROOT}/rp_maintenance/$vhostFQDN.html
|
||||
Header Set Cache-Control "no-store"
|
||||
</If>
|
||||
</Macro>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-ho+j7jyWK8fNQe+A12Hb8AhRq26LrZ/JpcUGGOn+Y7RsweNrtN/tE3MoK7ZeZDyx" crossorigin="anonymous"></script>
|
||||
<script src="https://www.w3schools.com/lib/w3data.js"></script>
|
||||
<link href="/rp_ressources/crna_customization.css" rel="stylesheet">
|
||||
<link href="/rp_ressources/customization.css" rel="stylesheet">
|
||||
<script type="text/javascript">
|
||||
function setAccesMaintenanceCookie() {
|
||||
var date = new Date();
|
||||
|
@ -34,8 +34,8 @@
|
|||
|
||||
<p class="lead"></p>
|
||||
|
||||
<p>L'application demandée est en maintenance. En tant que personnel de la DSI vous allez pouvoir y accéder. Cependant, merci de vous assurer
|
||||
auprès de l'équipe en charge de la maintenance que vos actions dans l'application ne risquent pas de perturber l'opération en cours.</p>
|
||||
<p>L'application demandée est en maintenance. En qu'administrateur vous allez pouvoir y accéder. Merci cependant de vous assurer
|
||||
que vos actions ne risquent pas de perturber l'opération en cours.</p>
|
||||
<a class="btn btn-primary" href="/" role="button">Accéder à l'application</a>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue