backup-conf.sh

-modif dossier destination
This commit is contained in:
2020-07-05 09:23:54 +02:00
parent 9e10864aea
commit cc064cde2f

View File

@@ -53,16 +53,19 @@ copy() {
if [[ -f $1 ]]; then cp $1 $2; fi
}
# Backup folder
dest=$HOME/Documents/Configurations/SilverBook
# Web: PHP / Apache / MySQL
dest_mamp=$dest/config\ web\ \(homebrew\)/
cd "$dest_mamp"
CURRENT_APACHE=$(httpd -v | grep "version" | awk '{print $3}' | awk -F/ '{print $2}')
CURRENT_PHP=$(php -v | grep "cli" | awk '{print $2}')
CURRENT_MYSQL=$(mysql -V | awk '{print $5}' | sed 's/.$//')
dest=$HOME/Documents/Configurations/SilverBook
dest_mamp=$dest/config\ web\ \(homebrew\)/
cd "$dest_mamp"
if [ ! -d "apache $CURRENT_APACHE" ]; then mkdir "apache $CURRENT_APACHE"; fi
cp /usr/local/etc/httpd/httpd.conf "$dest_mamp/apache $CURRENT_APACHE/"
cp /usr/local/etc/httpd/server.crt "$dest_mamp/apache $CURRENT_APACHE/"