Created
August 22, 2016 23:43
-
-
Save yuuki/b1977ace1c2f9d80ac71df382bde0f74 to your computer and use it in GitHub Desktop.
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 -ex | |
if [ -f /var/lib/mysql/mysqld-slow.log ]; then | |
sudo mv /var/lib/mysql/mysqld-slow.log /var/lib/mysql/mysqld-slow.log.$(date "+%Y%m%d_%H%M%S") | |
fi | |
if [ -f /var/log/nginx/isucon5.access_log.tsv ]; then | |
sudo mv /var/log/nginx/isucon5.access_log.tsv /var/log/nginx/isucon5.access_log.tsv.$(date "+%Y%m%d_%H%M%S") | |
fi | |
sudo systemctl restart mysql | |
sudo service memcached restart | |
sudo systemctl restart isuxi.perl | |
sudo systemctl restart nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment