Last active
August 29, 2015 14:06
-
-
Save K-Ko/5e05fe812f6a74849aa5 to your computer and use it in GitHub Desktop.
Hold Adminer up-to-date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Set pathe to Adminer document root | |
path=/var/www/html/adminer/public_html | |
### Fetch latest Adminer for MySQL only | |
wget -qO $path/.new http://www.adminer.org/latest-mysql.php | |
### Check if the download was successful and move the just downloaded file to its correct name | |
### (sometimes the downlaoded file is empty, I think it happens on timeouts) | |
find $path -name .new -not -empty -exec mv {} $path/adminer.php \; | |
### Change owner to the web server running user | |
chown www-data:www-data $path/adminer.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment