Skip to content

Instantly share code, notes, and snippets.

@artmouse
Forked from Marko-M/magento2-maintenance-mode.sh
Created November 20, 2015 21:06
Show Gist options
  • Save artmouse/f219e838b78a78bf393b to your computer and use it in GitHub Desktop.
Save artmouse/f219e838b78a78bf393b to your computer and use it in GitHub Desktop.
Activate maintenance mode on Magento 2 w/ IP address exclusion list
#!/bin/bash
# Comma separated list of IPs to be excluded
echo "123.123.123.123,234.234.234.234">var/.maintenance.ip
# For the rest of the world we go down for maintenance NOW
touch var/.maintenance.flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment