Merge pull request #265 from asm89/backup

Introduce `backup` plugin to export/import settings
This commit is contained in:
rhy-jot
2013-11-19 21:07:20 -08:00
8 changed files with 143 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
#!/bin/bash
VERSION="$1"
BASE_DIR="$2"
cat; find $BASE_DIR -regex ".*ssl/server\(.crt\|.key\)";

View File

@@ -0,0 +1,11 @@
#!/bin/bash
VERSION="$1"
IMPORT_DIR="$2"
TARGET_DIR="$3"
cd $IMPORT_DIR
for file in `find . -regex ".*ssl/server\(.crt\|.key\)"`; do
mkdir -p $(dirname $TARGET_DIR$file)
cp $file $TARGET_DIR$file
done