Fix variable quoting
This commit is contained in:
parent
52a1149b0f
commit
916478ee63
|
@ -3,19 +3,19 @@
|
||||||
export os_version_monkey=$(cat /etc/issue)
|
export os_version_monkey=$(cat /etc/issue)
|
||||||
MONGODB_DIR=$1 # If using deb, this should be: /var/monkey/monkey_island/bin/mongodb
|
MONGODB_DIR=$1 # If using deb, this should be: /var/monkey/monkey_island/bin/mongodb
|
||||||
|
|
||||||
if [[ $os_version_monkey == "Ubuntu 16.04"* ]] ;
|
if [[ ${os_version_monkey} == "Ubuntu 16.04"* ]] ;
|
||||||
then
|
then
|
||||||
echo Detected Ubuntu 16.04
|
echo Detected Ubuntu 16.04
|
||||||
export tgz_url="https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.6.12.tgz"
|
export tgz_url="https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-3.6.12.tgz"
|
||||||
elif [[ $os_version_monkey == "Ubuntu 18.04"* ]] ;
|
elif [[ ${os_version_monkey} == "Ubuntu 18.04"* ]] ;
|
||||||
then
|
then
|
||||||
echo Detected Ubuntu 18.04
|
echo Detected Ubuntu 18.04
|
||||||
export tgz_url="https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.0.8.tgz"
|
export tgz_url="https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.0.8.tgz"
|
||||||
elif [[ $os_version_monkey == "Debian GNU/Linux 8"* ]] ;
|
elif [[ ${os_version_monkey} == "Debian GNU/Linux 8"* ]] ;
|
||||||
then
|
then
|
||||||
echo Detected Debian 8
|
echo Detected Debian 8
|
||||||
export tgz_url="https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian81-3.6.12.tgz"
|
export tgz_url="https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian81-3.6.12.tgz"
|
||||||
elif [[ $os_version_monkey == "Debian GNU/Linux 9"* ]] ;
|
elif [[ ${os_version_monkey} == "Debian GNU/Linux 9"* ]] ;
|
||||||
then
|
then
|
||||||
echo Detected Debian 9
|
echo Detected Debian 9
|
||||||
export tgz_url="https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian92-3.6.12.tgz"
|
export tgz_url="https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-debian92-3.6.12.tgz"
|
||||||
|
@ -25,15 +25,15 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TEMP_MONGO=$(mktemp -d)
|
TEMP_MONGO=$(mktemp -d)
|
||||||
pushd $TEMP_MONGO
|
pushd ${TEMP_MONGO}
|
||||||
wget $tgz_url -O mongodb.tgz
|
wget ${tgz_url} -O mongodb.tgz
|
||||||
tar -xf mongodb.tgz
|
tar -xf mongodb.tgz
|
||||||
popd
|
popd
|
||||||
|
|
||||||
mkdir -p $MONGODB_DIR/bin
|
mkdir -p ${MONGODB_DIR}/bin
|
||||||
cp $TEMP_MONGO/mongodb-*/bin/mongod $MONGODB_DIR/bin/mongod
|
cp ${TEMP_MONGO}/mongodb-*/bin/mongod ${MONGODB_DIR}/bin/mongod
|
||||||
cp $TEMP_MONGO/mongodb-*/LICENSE-Community.txt $MONGODB_DIR/
|
cp ${TEMP_MONGO}/mongodb-*/LICENSE-Community.txt ${MONGODB_DIR}/
|
||||||
chmod a+x $MONGODB_DIR/bin/mongod
|
chmod a+x ${MONGODB_DIR}/bin/mongod
|
||||||
rm -r $TEMP_MONGO
|
rm -r ${TEMP_MONGO}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
Loading…
Reference in New Issue