Skip to content

Instantly share code, notes, and snippets.

@galiazzi
Created May 7, 2018 12:29
Show Gist options
  • Save galiazzi/9ae44655e15e55923dffbf3d6eca4a25 to your computer and use it in GitHub Desktop.
Save galiazzi/9ae44655e15e55923dffbf3d6eca4a25 to your computer and use it in GitHub Desktop.
#!/bin/bash
WEBDIR=/home/web/public/
RANDOM_NAME=$(cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1)
echo "<?php opcache_reset(); ?>" > ${WEBDIR}${RANDOM_NAME}.php
curl http://localhost/${RANDOM_NAME}.php
rm ${WEBDIR}${RANDOM_NAME}.php
echo "Opcache reseted"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment