From 522b4519e2fbd7c45d884828e1c75ebb0344b6b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bonhomme?= Date: Wed, 27 Sep 2017 08:39:56 +0200 Subject: [PATCH] configure the address of the public key --- scripts/backup_db.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/backup_db.sh b/scripts/backup_db.sh index 0234ff3..e749ebe 100644 --- a/scripts/backup_db.sh +++ b/scripts/backup_db.sh @@ -16,6 +16,7 @@ CLIENT=$0 MYSQL_CREDENTIALS='/var/www/'$CLIENT'/credentialsmysql.cnf' BACKUP_DIR='/var/www/'$CLIENT'/backup/' BACKUP_DIR=$BACKUP_DIR$(date +"%Y%m%d_%H%M%S") +PUCLIC_KEY=$1 if [ -e $MYSQL_CREDENTIALS ]; then mkdir $BACKUP_DIR @@ -23,7 +24,7 @@ if [ -e $MYSQL_CREDENTIALS ]; then mysqldump --defaults-file=$MYSQL_CREDENTIALS --databases monarc_cli > $BACKUP_DIR/dump-cli.sql echo -e "\e[32mEncrypting database...\e[0m" - openssl smime -encrypt -binary -text -aes256 -in plain.txt -out $BACKUP_DIR/dump-cli.sql.enc -outform DER /home/mysqldump/key/mysqldump.pub.pem + openssl smime -encrypt -binary -text -aes256 -in plain.txt -out $BACKUP_DIR/dump-cli.sql.enc -outform DER $1 rm $BACKUP_DIR/dump-cli.sql else