diff options
author | Ondrej Kubik <ondrej.kubik@canonical.com> | 2017-06-26 17:04:27 +0000 |
---|---|---|
committer | Ondrej Kubik <ondrej.kubik@canonical.com> | 2017-06-27 13:22:52 +0000 |
commit | a538c149768ee565ea1b0db3ef8e3bb2a7759da0 (patch) | |
tree | 6f3afd2ad16ab2d8bca3467f1f7c71ae95402185 /snap-src/mongodb-restore | |
parent | 60495e4765363b95e8e1859406d80c5588062e14 (diff) | |
download | wekan-a538c149768ee565ea1b0db3ef8e3bb2a7759da0.tar.gz wekan-a538c149768ee565ea1b0db3ef8e3bb2a7759da0.tar.bz2 wekan-a538c149768ee565ea1b0db3ef8e3bb2a7759da0.zip |
Adding snapcraft build support from source
Signed-off-by: Ondrej Kubik <ondrej.kubik@canonical.com>
Diffstat (limited to 'snap-src/mongodb-restore')
-rwxr-xr-x | snap-src/mongodb-restore | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/snap-src/mongodb-restore b/snap-src/mongodb-restore new file mode 100755 index 00000000..c1c82775 --- /dev/null +++ b/snap-src/mongodb-restore @@ -0,0 +1,16 @@ +#!/bin/bash + +# get wekan/mongo settings +source $SNAP/bin/wekan-read-settings + +# make sure we have set minimum env variables for locale +if [ -z "$LANG" ]; then + export LANG=en_US.UTF-8 +fi + +export LC_ALL=C + +# start mongodb backup +[ "x" == "x${MONGODB_BIND_IP}" ] && MONGODB_BIND_IP="127.0.0.1" +echo "using bind ip" +mongorestore --host $MONGODB_BIND_IP --port $MONGODB_PORT -d wekan --gzip --archive=$1 |