diff --git a/scripts/_common.sh b/scripts/_common.sh index dda5052..eddb1d4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -62,8 +62,7 @@ installdeps(){ sudo yunohost service add mongodb -l /var/log/mongodb/mongodb.log else #Install mongodb for debian x86/x64 - sudo apt-get install dirmngr - APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 + sudo apt-get install dirmngr && sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 9DA31620334BD75D9DCB49F368818C72E52529D4 echo "deb http://repo.mongodb.org/apt/debian ${DEBIAN_ISSUE}/mongodb-org/4.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list sudo apt-get update sudo apt-get install -y mongodb-org diff --git a/scripts/restore b/scripts/restore index 683657e..4ac6360 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,14 +1,16 @@ #!/bin/bash set -eu -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= - -source ./_common.sh +if [ ! -e _common.sh ]; then + # Fetch helpers file if not in current directory + sudo cp ../settings/scripts/_common.sh ./_common.sh + sudo chmod a+rx _common.sh +fi source /usr/share/yunohost/helpers +source _common.sh #================================================= # GENERIC START