Skip to content

Instantly share code, notes, and snippets.

@teru01
Last active September 10, 2020 04:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teru01/decde9a0985e2c233d20769d69756144 to your computer and use it in GitHub Desktop.
Save teru01/decde9a0985e2c233d20769d69756144 to your computer and use it in GitHub Desktop.
setup script
#!/bin/bash
set -ux
cd "${0%/*}"
dir=$(date +%Y-%m-%d-%H-%M-%S)
mkdir $dir
touch $dir/$dir
cp -a nginx.conf $dir
sudo nginx -s stop
sudo nginx -p $dir -c nginx.conf
sudo cp -a mysqld.cnf /etc/mysql/mysql.conf.d/mysqld.cnf
sudo rm /var/log/mysql/mysql-error.log /var/log/mysql/mysql-slow.log
sudo systemctl restart mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment